Most developers use TypeScript to annotate code they have already written. Advanced TypeScript is about letting types shape the design: APIs that cannot be called wrongly, states that cannot be combined illegally and refactors the compiler checks for you. This course covers the type system features behind well-typed libraries and shows when cleverness helps and when it just slows your team down.
What you'll learn
- Generics in depth: constraints, defaults, inference from arguments and the
consttype parameter modifier - Conditional types,
inferand distributive behaviour over unions - Mapped types, key remapping with
asand template literal types - Discriminated unions and exhaustive checks with
neverto model state safely - Narrowing with type predicates, assertion functions and the
satisfiesoperator - Branded and opaque types for IDs, currencies and validated strings
- Bridging runtime and compile time with schema libraries such as Zod or Valibot
- Typing higher-order functions, event emitters and builder APIs
- Strict compiler options, project references and keeping type-checking fast in large repos
- Publishing typed packages: declaration files,
exportsmaps and module resolution
Who it's for
- Developers who use TypeScript daily but reach for
anyoraswhen types get hard - Library and design-system authors who want APIs that are pleasant to call
- Tech leads setting TypeScript standards for a growing codebase
Prerequisites
- At least several months writing TypeScript in a real project
- Comfortable with interfaces, unions and basic generics (see React & TypeScript Fundamentals or Modern JavaScript Essentials for the groundwork)
- Node.js and an editor with TypeScript language support
Outcomes
By the end of this course you will be able to:
- Read and write conditional, mapped and template literal types with confidence.
- Model domain state so that invalid combinations fail to compile.
- Validate untrusted data at runtime and derive static types from the same schema.
- Design and publish a typed utility library with good inference and clear errors.
Course outline
| Module | Topic |
|---|---|
| 1 | How the type checker thinks: structural typing and assignability |
| 2 | Generics: constraints, inference and const type parameters |
| 3 | Unions, discriminated unions and exhaustive handling |
| 4 | Narrowing, type predicates, assertions and satisfies |
| 5 | Conditional types and infer |
| 6 | Mapped types, key remapping and template literal types |
| 7 | Branded types and making illegal states unrepresentable |
| 8 | Runtime validation with schema libraries |
| 9 | Typing functions, builders and event systems |
| 10 | Compiler options, performance and project references |
| 11 | Authoring and publishing typed packages |
| 12 | Project: a fully typed SDK for a REST API |
FAQ
Is this course about type-level puzzles?
Partly, but only where they pay off. We solve a few challenging exercises to build understanding, then focus on patterns you will actually ship and on keeping types readable for teammates.
Does it cover the newer TypeScript releases?
Yes. We use the current stable compiler and point out recent changes, including the native Go-based compiler work and what it means for build speed, as they affect day-to-day use.
Is it tied to React?
No. Examples include Node.js, React and plain library code. The patterns apply to any TypeScript project.
How do I join?
Get in touch and we'll share the current format, schedule and enrolment details.