Developers with real TypeScript experience: confident Level 2 graduates, mid-level and senior engineers, tech leads. A placement quiz tells you where to start.
You'll be able to
Read and write advanced types, design APIs that are pleasant and safe to use, and lead TypeScript at scale: architecture, generated types, checker performance, migrations, and team standards.
Running project
Typed toolkit. A small type-safe library (schemas, typed routes, and events) built up in Part A and hardened for real-world use in Part B.
Lessons take 20 to 30 minutes, some shorter or longer as the topic needs. Each module ends with a one-page cheat sheet, in its last lesson. Levels 2 and 3 start with a placement quiz, and a glossary covers the whole course.
Modules
18 modules, 72 lessons
Part A · Type-level mastery
M1 · 5 lessonsHow the Type System Works
1.1Structural typing and assignability
1.2Top and bottom types: unknown and never
1.3Widening, literal freshness, and the limits of control-flow analysis
1.4Variance: covariance, contravariance, and in / out annotations
1.5Where TypeScript is unsound, and why
Project stepStart the toolkit: sketch its public types and predict which assignments must fail.
M2 · 3 lessonsTesting and Debugging Types
2.1@ts-expect-error as a test
2.2Writing your own Equal and Expect helpers
2.3Debugging complex types: hover tricks and Prettify
Project stepSet up type tests with Equal and Expect; every later feature ships with them.
M3 · 4 lessonsConditional Types
3.1Conditional type syntax
3.2Distributive conditional types
3.3infer: extracting types
3.4Filtering and transforming unions
Project stepAdd Infer<Schema>, which extracts the value type from a schema.
M4 · 3 lessonsMapped Types
4.1Homomorphic mapped types
4.2+ / - modifiers
4.3Key remapping with as
Project stepTurn object schemas into types with optional and read-only fields.
M5 · 3 lessonsTemplate Literal Types
5.1Template literal type syntax
5.2Uppercase, Capitalize, and other intrinsic string types
5.3Extracting parts of strings: from "/users/:id" to { id: string }
Project stepAdd a typed route helper that extracts params from "/users/:id".
M6 · 4 lessonsRecursive Types
6.1Recursive type aliases: JSON and trees
6.2DeepPartial and DeepReadonly
6.3Path types ("user.address.city")
6.4Recursion depth limits
Project stepSupport nested schemas and deep paths like "user.address.city".
M7 · 4 lessonsBuilding Your Own Type Utilities
7.1Pick, Omit, and ReturnType from scratch
7.2UnionToIntersection, IsEqual, and IsAny
7.3Readable type errors for the people who use your types
7.4OptionalPractice set: type-level challenges
Project stepWrite the toolkit's own helpers and give common misuse a readable error.
M8 · 6 lessonsAdvanced Generics
8.1How inference picks T
8.2const type parameters
8.3NoInfer and controlling inference sites
8.4Variadic tuple types: typing functions like pipe and concat
8.5Higher-order generic functions
8.6OptionalEmulating higher-kinded types
Project stepMake the API keep literal types with const parameters and NoInfer.
M9 · 6 lessonsPopular Libraries, Step Three: Reading Their Types
9.1How to read a .d.ts file you didn't write
9.2Case study: how TypeScript types its own standard library (Array.map, Object.entries, Promise.all)
9.3type-fest: ready-made utility types, compared with the ones you wrote
9.4Inside zod: how z.infer turns a schema into a type
9.5Inside a query builder (Drizzle or Kysely): result types inferred from queries
9.6Inside tRPC: sharing types between server and client without code generation
Project stepCompare your schema design with Zod's and record three decisions you would change.
M10 · 4 lessonsType-Safe API Design
10.1Builder and fluent APIs, and the polymorphic this type
10.2A type-safe event emitter
10.3Type-level state machines
10.4The cost of cleverness: when type-level magic hurts
Project stepAdd a fluent schema builder and a typed event emitter for validation events.
M11 · 4 lessonsExtension and Metaprogramming
11.1Declaration merging
11.2Module augmentation
11.3Decorators (TC39 standard), and why they need a build step today
11.4using and explicit resource management
Project stepLet users register custom validators through declaration merging.
Part B · TypeScript at scale
M12 · 4 lessonsArchitecture with Types
12.1Module boundaries: designing a module's public types
12.2Dependency injection with plain functions and interfaces
12.3Extensible registries: letting users add types to your library (the Register interface pattern)
12.4Typed errors across layers: domain, application, and transport
Project stepSplit the toolkit into a core and plugins with clear public types.
M13 · 3 lessonsTypes from Outside
13.1Generating types from OpenAPI and JSON Schema
13.2Types from database schemas
13.3Keeping generated and hand-written types in sync
Project stepGenerate schemas from an OpenAPI description and keep them in sync.
M14 · 5 lessonsSharing Types
14.1Declaration files: generating them and writing them by hand
14.2How TypeScript finds a package's types (types, exports)
14.3isolatedDeclarations
14.4Semantic versioning for types: what counts as a breaking change
14.5Supporting several TypeScript versions
Project stepEmit declaration files, set up exports, and write a compatibility policy.
M15 · 4 lessonsType-Checker Performance
15.1How the checker spends its time: instantiation, caching, and depth limits
15.2Measuring with --extendedDiagnostics and --generateTrace
15.3Faster patterns: interfaces over intersections, annotated return types, smaller unions
15.4Performance budgets in CI
Project stepMeasure the toolkit's type-check cost and fix its slowest type.
M16 · 4 lessonsLarge Codebases
16.1Project references and monorepos
16.2Incremental adoption: moving a loose codebase to strict, file by file
16.3Measuring type coverage and tracking any
16.4OptionalCodemods: changing thousands of files safely
Project stepTurn the repo into a monorepo with project references for the core and plugins.
M17 · 4 lessonsLeading TypeScript in a Team
17.1A shared tsconfig.json strategy
17.2Type-safety lint rules worth enforcing
17.3Review standards and an any budget
17.4Upgrading TypeScript across a codebase: the 6.0 to 7.0 move as a case study
Project stepWrite the toolkit's contributor guide: shared config, lint rules, and a review checklist.
M18 · 2 lessonsFinal Project
18.1Option A: publish the toolkit with type tests, declaration files, and a compatibility policy
18.2Option B: migrate a real open-source project to strict TypeScript and write up the results
Project stepChoose your finale: publish the toolkit, or migrate an open-source project and publish a write-up.
TipBonus lesson A.10 shows how to publish a package to npm.
Read and write advanced types, design APIs that are pleasant and safe to use, and lead TypeScript at scale: architecture, generated types, checker performance, migrations, and team standards.
Not part of the levels. These two modules show where TypeScript is used and which libraries you'll meet. Each lesson explains what a platform, tool, or library is for and shows one short example of where TypeScript helps. The tools themselves are learned separately; this course doesn't teach them in depth.
Bonus A · 15 lessonsTypeScript in the Real WorldPart 1 reads best after Level 2. Its Git lesson, the first of Part 2, builds on Level 1's lessons 15.2 and 15.3: read it any time after Level 1.
Bonus B · 29 lessons · coming soonMust-Have LibrariesA catalog, not a sequence: read any lesson once you've reached the level on its tag. Libraries already taught inside the levels (chalk, commander, date-fns, lodash, zod, axios, ts-pattern, vitest, type-fest, Drizzle or Kysely, tRPC) aren't repeated here.
Advanced TypeScript — Level 3 of TypeScript from Zero | DevFox Labs