PROGRAMMING
TypeScript
Practical tutorials for the work we actually do. Pick one, read it in order, and apply it.
0 likes
Likes for this tutorial.
Partial and Required on a Form Draft Object
Level: Intermediate
Derive a draft type with Partial, require every field with Required, and write one check that turns a draft into the finished type. After this, an unfinished form cannot reach the submit function.
4 min read
0 likes
Likes for this tutorial.
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.
5 min read
0 likes
Likes for this tutorial.
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.
5 min read