Skip to content

Inside the checker

M1 to M6 taught you to use the type system. This track opens it up: how the checker decides that one type is assignable to another, how types widen, narrow and get inferred, where TypeScript is unsound on purpose, and how far type-level programming goes before the compiler gives up. Every lesson starts from a real Relay bug that type-checked, or a type error that looked wrong but wasn’t. It assumes all of M1 to M6.

Most lessons run in the browser. Lesson 9 needs real files and runs locally.

# Lesson
1 Assignability and freshness: the exact rules behind “is not assignable to”
2 Widening and contextual typing: why let forgets literals and lambdas know their parameters
3 Control-flow analysis and its limits: what narrowing survives, and what resets it
4 Inference: candidates, priorities and overload resolution
5 The unsoundness catalog: bugs that type-check, and how to close each one
6 Type-level parsing with template literal types
7 Type-level arithmetic and recursion limits
8 Decorators and metadata (stage 3)
9 The compiler as a system: module resolution, type stripping, TypeScript 7
10 Capstone: a typed SQL query builder that parses SQL at the type level