Skip to content

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 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. 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.

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

Conditional Types

Derive useful relationships with conditionals, distribution and infer.

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

Day 2 · About 90 minutes

Mapped API Contracts

Transform modifiers and keys while preserving each callback input.

  1. Mapped Modifiers 25 min · Read, predict, build and test
  2. Key Remapping 20 min · Read, predict, build and test
  3. Typed Registries 20 min · Read, predict, build and test
  4. Checkpoint: Titled Event Listeners 25 min · Independent practice

Day 3 · About 90 minutes

Validated Domain Values

Establish branded ids and controlled inference with explicit runtime evidence.

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

Day 4 · About 90 minutes

Correlated Events

Derive paired event unions and dispatch safely to typed channels.

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

Day 5 · About 90 minutes

Library Lifetime & Failures

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

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

Day 6 · About 90 minutes

Public Contract Evidence

Check generated declarations, consumer misuse and runtime invariants.

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

Day 7 · About 80 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 20 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