Typorithm learning path
TypeScript: foundations
Build reliable programs with inference, unions, narrowing, generics and strict checking. Prerequisite: JavaScript functions, objects and arrays. Complete each independent lab before opening its solution.

Study with a practical destination
Use the linked lessons in order, complete the lab and explain the decisions without the reference. Select the path and depth that match your role.
TypeScript: from foundations to a working React boundary
Before starting: JavaScript functions, objects, arrays and promises. Start with TypeScript foundations; the type-design course is a deliberate next stage, not a beginner prerequisite.
Build and explain: Validate unknown data, preserve useful type relationships and build a small typed React interface with independently tested state and filters.
- 1. 1. Static checking and a reproducible workspace
- 2. 4. Discriminated unions and exhaustive decisions
- 3. 5. Control-flow narrowing and honest guards
- 4. 9. Generics, constraints and preserved relationships
- 5. 10. keyof, typeof and indexed access
- 6. 16. Capstone: validate and filter a role catalogue
- 7. 3. Conditional types and distribution
- 8. 5. Mapped types and key remapping
- 9. 9. satisfies, const assertions and configuration
- 10. 16. Capstone: a correlated event registry
- 11. 1. Runtime decoding at an API boundary
- 12. 6. React props, children and DOM events
- 13. 7. Typed state, reducers, refs and effects
- 14. 16. Capstone: a typed role explorer
Review evidence: Complete the small warm-up before guided typing, attempt the independent task with hints, then compare the solution and acceptance cases. Optional stretches and the isolated 7.1 beta preview are additional study, not prerequisites for stable API and React work.
Your learning path
0 of 16 lessons completed
Saved on this device
Module 1 · 1 lessons
1. Static checking and a reproducible workspace
Separate compile-time guarantees from runtime behavior; run a pinned compiler with an explicit strict configuration.
Module 2 · 1 lessons
2. Inference, literals and widening
Control when values remain literal and when mutable variables need a wider type.
Module 3 · 1 lessons
3. Objects, structural compatibility and optional fields
Model object capabilities without confusing structural typing with exact runtime validation.
Module 4 · 1 lessons
4. Discriminated unions and exhaustive decisions
Represent valid alternatives and make missing branches visible when a domain evolves.
Module 5 · 1 lessons
5. Control-flow narrowing and honest guards
Use runtime evidence to refine types without making promises that the guard does not verify.
Module 6 · 1 lessons
6. Nullability, optional fields and indexed reads
Handle absence where it occurs instead of hiding it with non-null assertions.
Module 7 · 1 lessons
7. Function contracts, callbacks and overload restraint
Describe inputs, outputs and callback behavior without weakening the API to any.
Module 8 · 1 lessons
8. Arrays, readonly inputs and positional tuples
Choose sequence contracts that preserve ordering, ownership and positional meaning.
Module 9 · 1 lessons
9. Generics, constraints and preserved relationships
Use type parameters to connect values instead of replacing uncertainty with any.
Module 10 · 1 lessons
10. keyof, typeof and indexed access
Connect known property names to the values they select.
Module 11 · 1 lessons
11. unknown errors and explicit result types
Separate expected failures from thrown values and preserve exhaustive error handling.
Module 12 · 1 lessons
12. Type-only imports and runtime module resolution
Choose module settings for the actual execution host instead of treating import syntax as sufficient.
Module 13 · 1 lessons
13. Classes, private state and composition
Distinguish static visibility, runtime privacy and replaceable capabilities.
Module 14 · 1 lessons
14. Declarations and gradual JavaScript adoption
Treat declaration files as external contracts, not as generated runtime implementations.
Module 15 · 1 lessons
15. Type regression tests and deliberate strictness
Test both valid calls and rejected contracts without mistaking diagnostic suppression for correctness.
Module 16 · 1 lessons
16. Capstone: validate and filter a role catalogue
Build a small end-to-end boundary with honest results, immutable filtering and regression checks.