typestar

Type-level programming

12 steps in 5 sets of TypeScript.

Conditional types, mapped types, template literal types, and recursion. This is programming, executed by the compiler, with types as the values.

Twelve steps, ending with exhaustiveness checks and type-level tests. Genuinely useful in a library and genuinely possible to overdo in an application. Both are worth knowing by hand.

Start this tour

Conditional types

Mapped types

Strings & recursion

Exhaustiveness & tests

Encore

  • typed-router.tsA router whose path parameters are extracted from the pattern at compile time.

The other TypeScript tours