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 const type parameter modifier
  • Conditional types, infer and distributive behaviour over unions
  • Mapped types, key remapping with as and template literal types
  • Discriminated unions and exhaustive checks with never to model state safely
  • Narrowing with type predicates, assertion functions and the satisfies operator
  • 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, exports maps and module resolution

Who it's for

  • Developers who use TypeScript daily but reach for any or as when 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

Outcomes

By the end of this course you will be able to:

  1. Read and write conditional, mapped and template literal types with confidence.
  2. Model domain state so that invalid combinations fail to compile.
  3. Validate untrusted data at runtime and derive static types from the same schema.
  4. Design and publish a typed utility library with good inference and clear errors.

Course outline

ModuleTopic
1How the type checker thinks: structural typing and assignability
2Generics: constraints, inference and const type parameters
3Unions, discriminated unions and exhaustive handling
4Narrowing, type predicates, assertions and satisfies
5Conditional types and infer
6Mapped types, key remapping and template literal types
7Branded types and making illegal states unrepresentable
8Runtime validation with schema libraries
9Typing functions, builders and event systems
10Compiler options, performance and project references
11Authoring and publishing typed packages
12Project: 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.