Lesson 4.36mIntermediate9.5k students

Declaration files and untyped packages

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

This lesson sits in TypeScript in Practice, part of TypeScript for Application Developers. It assumes what came before it and leads directly into the next lesson in the module.

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

Resources