How to Learn Type-Level Programming?
-
Do Type challenges. It's a large, open-source list of challenges you need to solve
using only types. It comes with tests and community solutions.
- https://type-level-typescript.com/ → A thorough guide to practical programming with types by Gabriel Vergnaud (author of ts-pattern).
-
Study the source code of libraries that do cool things with types,
e.g.:
- DrizzleORM
- zod
- ts-pattern
- …
-
Check out Walk That Type.
A (work-in-progress) tool I working on that lets you paste or write
any type, then step through it while explaining what happens at each
step!
- Write a lot of types!