TypeScript / Intermediate · Free and public
Intermediate TypeScript in 7 Days
Build a typed catalogue gateway with reusable decoders, async ports, state transitions and compile/runtime contract tests.
Start Day 1 →Build on what you know
Prerequisites: TypeScript beginner, plus JavaScript intermediate promises, async/await and injected dependencies before Day 5. The first lesson links to the relevant earlier material. Take extra sessions whenever a prerequisite needs practice.
30 lessons over seven days. Plan around 60–90 minutes per day for worked explanations, prediction, contrasting cases and independent practice; the exact suggested total appears below each day. Delayed review is extra. These are proposed active-study budgets, not measured completion times.
Real TypeScript diagnostics run locally before execution. Await async work explicitly; these editors are single-file ES modules. No assertions are needed to bypass validation. No account or external API required.
Use hints before solutions, change inputs, and return after a delay. Completion is saved in this browser separately from other courses. Editor edits are not automatically persisted. Download the tested modular project for optional Node.js 22+ local work.
Ready to design reusable typed APIs? Continue with advanced TypeScript →
Day 1 · About 80 minutes
Truthful Public Contracts
Distinguish runtime projection from structural compatibility and type-only dependencies.
- Structural Contracts 17 min · Read, predict, build and test
- Configuration & satisfies 20 min · Read, predict, build and test
- Modules & Type Imports 18 min · Read, predict, build and test
- Checkpoint: Public Records 25 min · Independent practice
Day 2 · About 80 minutes
Relationships Between Types
Use keyof, indexed access, generic callbacks, tuples and small mapped types.
- keyof & Indexed Types 17 min · Read, predict, build and test
- Generic Callbacks 20 min · Read, predict, build and test
- Tuples & Mapped Types 18 min · Read, predict, build and test
- Checkpoint: Typed Pluck 25 min · Independent practice
Day 3 · About 80 minutes
Results & State Transitions
Model meaningful variants, check exhaustiveness and reject stale completions.
- Generic Result Types 17 min · Read, predict, build and test
- State Unions 20 min · Read, predict, build and test
- Exhaustiveness & never 18 min · Read, predict, build and test
- Checkpoint: Request State 25 min · Independent practice
Day 4 · About 80 minutes
Reusable Validation
Decode unknown records and lists with useful field paths and identity rules.
- Decoder Contracts 17 min · Read, predict, build and test
- Array Decoders 20 min · Read, predict, build and test
- Domain Rules & Identity 18 min · Read, predict, build and test
- Checkpoint: Book Decoder 25 min · Independent practice
Day 5 · About 80 minutes
Typed Async Boundaries
Type promises and injected dependencies without hiding untrusted data or cancellation policy.
- Typed Promises 17 min · Read, predict, build and test
- Async Ports & Dependencies 20 min · Read, predict, build and test
- Typed Cancellation 18 min · Read, predict, build and test
- Checkpoint: Typed Loader 25 min · Independent practice
Day 6 · About 80 minutes
Contract Evidence
Combine compile-only negative tests with runtime boundaries and controlled schedules.
- Compile-Time Contract Tests 17 min · Read, predict, build and test
- Runtime Boundary Tests 20 min · Read, predict, build and test
- Typed Schedule Tests 18 min · Read, predict, build and test
- Checkpoint: Regression Suite 25 min · Independent practice
Day 7 · About 80 minutes
Ship a Typed Catalogue
Run, test and extend a real modular project, then solve a fresh stock gateway brief.
- Capstone: Typed Catalogue 15 min · Read, predict, build and test
- Testing the Public Contract 15 min · Read, predict, build and test
- Modules & Compiler Settings 15 min · Read, predict, build and test
- Extending Typed APIs 15 min · Read, predict, build and test
- On Your Own: Stock Gateway 20 min · Independent practice
- Come Back Later: Review Challenges 20 min · Return later · extra review