TypeScript
Languages and web fundamentals · 4 stages · 28 units in the full series · 28 published in English
Series goal
Distinguish static type relationships from runtime data validation, and design contracts that can change.
Prerequisites
JavaScript objects·functions·modules
Practice approach and scope
Learning units are not calendar days. Read the explanation and tasks, check the completion criteria, then move on. Use each example as a starting point: change variables and observe the results. Built-in examples and tasks requiring a separate environment are identified separately. Opening an example does not complete a unit.
Existing unit IDs and notes are preserved. The original 01, 02, and 03 examples occupy positions 1, 14, and 28 in the expanded sequence, so the number in the address may differ from the learning order.
Only published English units are linked below. The full series has 28 units.
Learning path
Stage 1 · Type Checking and Data Models
- 01. Types and Narrowing — Editable example
- 02. strict Settings and Executable Code — Editable example
- 03. Inference and Literal Types — Editable example
- 04. Object Contracts and Optional Fields — Editable example
- 05. Positional Meaning in Arrays and Tuples — Editable example
- 06. Function Arguments and Return Contracts — Editable example
- 07. unknown and Safe Access — Editable example
Stage 2 · Unions and Generics
- 08. Modeling Async State with Discriminated Unions — Editable example
- 09. Finding Missing Branches with never — Editable example
- 10. readonly and the Scope of Mutation — Editable example
- 11. keyof and Property Lookup Functions — Editable example
- 12. Generic Functions and Inference — Editable example
- 13. Constraints and Minimal Contracts — Editable example
- 14. Generics and Boundary Validation — Editable example
Stage 3 · Validation and Type Transformations
- 15. Type Guards and False Guarantees — Editable example
- 16. Passing Failures with Result Types — Editable example
- 17. Editing Models with Utility Types — Editable example
- 18. Checking Configuration with satisfies — Editable example
- 19. State Tables with Mapped Types — Editable example
- 20. Conditional Types and Distribution — Editable example
- 21. Template Literal Event Names — Editable example
Stage 4 · Module Contracts and Plugins
- 22. DOM Types and null Checks — Editable example
- 23. Async Functions and Error Types — Editable example
- 24. Modules and type-only import — Editable example
- 25. Declaration Files and External Boundaries — Editable example
- 26. Cases That Verify Compilation Failures — Editable example
- 27. Plugin Ownership and Cleanup Contracts — Editable example
- 28. Plugin Contracts — Editable example
Capstone project and deliverables
A mount/dispose plugin with interchangeable DOM and Canvas implementations, plus a collection of valid and rejected cases
Keep the implementation, run instructions, baseline and changed conditions, failure cases, and recovery steps together. Do not report unmeasured performance or tests you have not run as results.