TypeScript course

TypeScript Level 14: Advanced Type Design

Advanced Type Design is level 14 of 16 of the LoWisa TypeScript course. It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

Updated 2026-11-16

Type-Level Programming

  • Types as functions. Generic conditional types are functions over types: inputs, branching, recursion, all at compile time.
  • Recursive types. A recursive type walks nested structures: DeepReadonly visits every property of every child.
  • Know the limits. The checker has depth and complexity limits: a type that times out the compiler is a design smell.

API and Library Type Architecture

  • Inference-first APIs. The best APIs need no type arguments: design so inference carries the caller the whole way.
  • Builder and fluent typing. A typed builder accumulates knowledge step by step, refusing build() until the required parts exist.
  • Overload surfaces. Public libraries shape ergonomics with careful overloads: precise returns for each documented call shape.

Balancing Type Safety and Complexity

  • The cleverness budget. Every team has a type cleverness budget: spend it where bugs are expensive, not where it is fun.
  • Escape hatches, labelled. A justified cast is honest when commented: the assumption named, dated and owned.
  • Optimise for the reader. The winning type design is the one a tired colleague reads correctly at review speed.

Before and after this level

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.

Frequently asked questions

What does TypeScript Level 14: Advanced Type Design cover?

Type-Level Programming, API and Library Type Architecture, Balancing Type Safety and Complexity: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 13: Testing & Refactoring, which covers Testing Typed Code, Type-Safe Refactoring, Maintaining Large TypeScript Codebases.

Learn TypeScript on your phone

The first level is free. LoWisa is on Google Play and the App Store.