TypeScript / Advanced · Free and public

Advanced TypeScript in 7 Days

Design a typed event gateway with derived contracts, validated domain values, safe dispatch and public consumer tests.

Start Day 1 →

Build on what you know

Prerequisites: TypeScript intermediate, including mapped types, unknown decoders, generic callbacks and compile-time tests. JavaScript advanced is optional. The first lesson links to focused refreshers. Plan 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. A single audited brand assertion follows runtime validation; assertions never replace the input checks. 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.

Day 1 · About 70 minutes

Conditional Types

Derive useful relationships with conditionals, distribution and infer.

  1. Conditional Types 12 min · Read, predict, build and test
  2. Union Distribution 20 min · Read, predict, build and test
  3. infer & Derived Types 13 min · Read, predict, build and test
  4. Checkpoint: Decoder Types 25 min · Independent practice

Day 2 · About 75 minutes

Mapped API Contracts

Transform modifiers and keys while preserving each callback input.

  1. Mapped Modifiers 17 min · Read, predict, build and test
  2. Key Remapping 15 min · Read, predict, build and test
  3. Typed Registries 18 min · Read, predict, build and test
  4. Checkpoint: Event Formatters 25 min · Independent practice

Day 3 · About 70 minutes

Validated Domain Values

Establish branded ids and controlled inference with explicit runtime evidence.

  1. Branded IDs 12 min · Read, predict, build and test
  2. Assertion Functions 20 min · Read, predict, build and test
  3. Literal Inference & NoInfer 13 min · Read, predict, build and test
  4. Checkpoint: Validated Payloads 25 min · Independent practice

Day 4 · About 80 minutes

Correlated Events

Derive paired event unions and dispatch safely to typed channels.

  1. Derived Event Unions 17 min · Read, predict, build and test
  2. Correlation & Dispatch 20 min · Read, predict, build and test
  3. Callback Contracts 18 min · Read, predict, build and test
  4. Checkpoint: Typed Channels 25 min · Independent practice

Day 5 · About 80 minutes

Library Lifetime & Failures

Distinguish async types, synchronous callback returns, disposal and failure boundaries.

  1. Awaited & Async Boundaries 17 min · Read, predict, build and test
  2. void & Callback Returns 20 min · Read, predict, build and test
  3. Disposal & Lifetime 18 min · Read, predict, build and test
  4. Checkpoint: Gateway Failures 25 min · Independent practice

Day 6 · About 75 minutes

Public Contract Evidence

Check generated declarations, consumer misuse and runtime invariants.

  1. Public Type Tests 17 min · Read, predict, build and test
  2. Runtime Contract Tests 20 min · Read, predict, build and test
  3. Declarations & Package Exports 13 min · Read, predict, build and test
  4. Checkpoint: Regression Evidence 25 min · Independent practice

Day 7 · About 75 minutes

Ship a Typed Event Gateway

Run a real modular library, test its limits and solve a fresh settings patch brief.

  1. Capstone: Typed Event Gateway 10 min · Read, predict, build and test
  2. Tests & Mutation Lab 15 min · Read, predict, build and test
  3. Modules & Local Use 15 min · Read, predict, build and test
  4. Extending Event Contracts 15 min · Read, predict, build and test
  5. On Your Own: Settings Patches 20 min · Independent practice
  6. Come Back Later: Review Challenges 20 min · Return later · extra review