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 90 minutes on Days 1–6 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 →
Study by explaining, repairing, and building
Days 1–6 each budget about 90 minutes, including a debugging exercise and an independent checkpoint. Split a day into two sessions if needed. These are planning estimates; take longer whenever you need to rebuild an idea.
Predict a worked example before running it. Trace the contract in your own words, repair the day's plausible mistake, then close the examples and attempt the checkpoint. Use its acceptance cases to test a boundary as well as an ordinary input.
After checking a solution, change the input and explain why your version still works. Begin your next session by rebuilding a small part from memory. Day 7 combines the ideas in a project; Come Back Later adds delayed practice and a readiness check for your next step.
Day 1 · About 90 minutes
Truthful Public Contracts
Distinguish runtime projection from structural compatibility and type-only dependencies.
- Structural Contracts 25 min · Read, predict, build and test
- Configuration & satisfies 20 min · Read, predict, build and test
- Modules & Type Imports 20 min · Read, predict, build and test
- Checkpoint: Public Records 25 min · Independent practice
Day 2 · About 90 minutes
Relationships Between Types
Use keyof, indexed access, generic callbacks, tuples and small mapped types.
- keyof & Indexed Types 25 min · Read, predict, build and test
- Generic Callbacks 20 min · Read, predict, build and test
- Tuples & Mapped Types 20 min · Read, predict, build and test
- Checkpoint: Typed Pluck 25 min · Independent practice
Day 3 · About 90 minutes
Results & State Transitions
Model meaningful variants, check exhaustiveness and reject stale completions.
- Generic Result Types 20 min · Read, predict, build and test
- State Unions 20 min · Read, predict, build and test
- Exhaustiveness & never 25 min · Read, predict, build and test
- Checkpoint: Request State 25 min · Independent practice
Day 4 · About 90 minutes
Reusable Validation
Decode unknown records and lists with useful field paths and identity rules.
- Decoder Contracts 25 min · Read, predict, build and test
- Array Decoders 20 min · Read, predict, build and test
- Domain Rules & Identity 20 min · Read, predict, build and test
- Checkpoint: Book Decoder 25 min · Independent practice
Day 5 · About 90 minutes
Typed Async Boundaries
Type promises and injected dependencies without hiding untrusted data or cancellation policy.
- Typed Promises 25 min · Read, predict, build and test
- Async Ports & Dependencies 20 min · Read, predict, build and test
- Typed Cancellation 20 min · Read, predict, build and test
- Checkpoint: Typed Loader 25 min · Independent practice
Day 6 · About 90 minutes
Contract Evidence
Combine compile-only negative tests with runtime boundaries and controlled schedules.
- Compile-Time Contract Tests 25 min · Read, predict, build and test
- Runtime Boundary Tests 20 min · Read, predict, build and test
- Typed Schedule Tests 20 min · Read, predict, build and test
- Checkpoint: Regression Suite 25 min · Independent practice
Day 7 · About 90 minutes
Ship a Typed Catalogue
Run, test and extend a real modular project, then solve a fresh stock gateway brief.
- Capstone: Typed Catalogue 30 min · Read, predict, build and test
- Modules & Compiler Settings 10 min · Read, predict, build and test
- Testing the Public Contract 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