Skip to content

TypeScript Deep Dive

A standalone, intermediate→advanced course on TypeScript's type system. From structural typing and inference to generics, conditional & mapped types, template literals, recursive types, decorators, the compiler, and typing real APIs — every topic taught through annotated code that shows exactly what the compiler infers.

Foundations & Mental Model

Why TypeScript, types as sets of values, structural typing, and how inference really works. Start →

Everyday Types, Deep

Literals & widening, unions & intersections, objects/arrays/tuples, functions, and narrowing. Sharpen →

Generics

Type parameters, constraints, conditional types, and how inference and infer work. Generalize →

Type-Level Programming

Mapped types, template literal types, keyof & indexed access, the utility types, and recursion. Compute →

Classes & Advanced OOP

Fields & access, this types, stage-3 decorators, and mixins. Model →

The Compiler & Tooling

tsconfig that matters, module resolution, declaration files, and emit. Configure →

Practical Mastery

Typing APIs & boundaries, nullability & never, performance pitfalls, and migration strategy. Apply →

Types as the star

This is a course about the type system, not JavaScript syntax. Examples are annotated to show exactly what the compiler infers and where it errors — the way you actually read TypeScript.

Mental models first

Every topic starts from a model — types as sets of values, structural compatibility, inference sites — so advanced features stop feeling like magic and start feeling inevitable.

Depth, not just usage

Not “here’s Partial<T>” but “here’s how Partial is built, and how to build your own.” You’ll read and write type-level code with confidence.

Diagrams that explain

Type widening, narrowing flow, conditional-type distribution, and module resolution as theme-aware Mermaid diagrams. Bilingual (English / ไทย) with saved quiz progress.