TypeScript for Application Developers
LESSON 4.3

Declaration files and untyped packages

Learn key techniques and workflows in TypeScript for Application Developers.

5m
intermediate
9,544 students

Overview

Sooner or later a dependency ships no types. Writing a small declaration file is faster and safer than sprinkling any across your codebase.

In this lesson you will:

  • Write a minimal declaration for an untyped module
  • Augment the types of an existing package
  • Declare global types without polluting every file

Pro Tip

Use caching and revalidation wisely to ensure your app stays fast and data remains fresh without unnecessary requests.

Resources