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.

  1. Structural Contracts 17 min · Read, predict, build and test
  2. Configuration & satisfies 20 min · Read, predict, build and test
  3. Modules & Type Imports 18 min · Read, predict, build and test
  4. 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.

  1. keyof & Indexed Types 17 min · Read, predict, build and test
  2. Generic Callbacks 20 min · Read, predict, build and test
  3. Tuples & Mapped Types 18 min · Read, predict, build and test
  4. Checkpoint: Typed Pluck 25 min · Independent practice

Day 3 · About 80 minutes

Results & State Transitions

Model meaningful variants, check exhaustiveness and reject stale completions.

  1. Generic Result Types 17 min · Read, predict, build and test
  2. State Unions 20 min · Read, predict, build and test
  3. Exhaustiveness & never 18 min · Read, predict, build and test
  4. 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.

  1. Decoder Contracts 17 min · Read, predict, build and test
  2. Array Decoders 20 min · Read, predict, build and test
  3. Domain Rules & Identity 18 min · Read, predict, build and test
  4. 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.

  1. Typed Promises 17 min · Read, predict, build and test
  2. Async Ports & Dependencies 20 min · Read, predict, build and test
  3. Typed Cancellation 18 min · Read, predict, build and test
  4. 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.

  1. Compile-Time Contract Tests 17 min · Read, predict, build and test
  2. Runtime Boundary Tests 20 min · Read, predict, build and test
  3. Typed Schedule Tests 18 min · Read, predict, build and test
  4. 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.

  1. Capstone: Typed Catalogue 15 min · Read, predict, build and test
  2. Testing the Public Contract 15 min · Read, predict, build and test
  3. Modules & Compiler Settings 15 min · Read, predict, build and test
  4. Extending Typed APIs 15 min · Read, predict, build and test
  5. On Your Own: Stock Gateway 20 min · Independent practice
  6. Come Back Later: Review Challenges 20 min · Return later · extra review