Engrain by ByteRush

TS.09.01 Mid-level

Declaration files and module resolution

Comes up in: Coding

This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.

What it covers

  • .d.ts files
  • @types
  • declare module
  • augmenting globals and modules
  • moduleResolution modes
  • exports/types in package.json for libraries

Words you will know

declaration fileambient declarationmodule augmentation

What you will practise

  • add types for an untyped package

Interview questions this answers

  • What is a .d.ts file?
  • How do you add types to a third-party library that has none?