Lesson 4.3

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.

Duration
6m
Level
Intermediate
Students
9.5k 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

Resources

TypeScript handbook

The official reference for the tools used in this lesson.