module augmentation

Adding types to another package from your own code with declare module "name" { } and declaration merging.

In more detail

It is how you tell TypeScript that Express requests carry a user property added by your authentication middleware. Only merges are allowed; you cannot remove or change existing declarations.

Related terms

Taught in

References