Skip to Content
0 likes
Augment Express Request Without Fighting the Compiler Level: Advanced

Add a user property to the Express request type with a module augmentation in one declaration file. After this, middleware and handlers agree on the type and you avoid the mistake that floods node_modules with errors.

0 likes
Template Literal Types for /users/:id Routes Level: Advanced

Turn a route pattern into a type that finds the parameter names and checks the paths you pass. After this, a typo in a route or a missing parameter is a compile error.