TypeScript for JavaScript Developers
TypeScript is JavaScript with a compile-time type system — the language you already know, plus a checker that catches bug categories before they ship. This track starts from your existing JavaScript fluency: every lesson explains why the type system exists, shows the plain-JS failure pattern it prevents, and teaches the production practices that make types pay off in real codebases. You keep the entire JavaScript ecosystem; you gain refactor safety, self-documenting APIs, and a CI gate for correctness.
How to study this track: lessons build in order — the compiler model from phase 1 is assumed everywhere else. Each example states its purpose, the output you should see, and the takeaway; run the demos locally as you go.
TypeScript Study Progress
| # | TypeScript | Topic | Description |
|---|---|---|---|
| PHASE 1: WHY TYPESCRIPT & FOUNDATIONS | |||
| 01 | Why TypeScript for JavaScript Developers | The runtime-bug patterns types eliminate, what TypeScript changes and what it deliberately does not. | |
| 02 | Setup and the Strict Toolchain | Install tsc as a project tool, a strict tsconfig baseline, and the three ways to run TypeScript. | |
| 03 | Inside the Compiler | Checking versus emitting, type erasure, and disciplined error suppression. | |
| 04 | The Syntax Delta | Annotation syntax and the type-level constructs layered onto JavaScript you already know. | |
| PHASE 2: THE TYPE SYSTEM | |||
| 05 | Core Types and Narrowing | Primitives, any versus unknown, unions, discriminated unions, and control-flow narrowing. | |
| 06 | Structural Typing | Why shapes, not names, decide compatibility — and when that backfires. | |
| 07 | Typed Functions | Signatures, overloads, contextual typing, and safe callbacks. | |
| 08 | Interfaces and Contracts | Optional and readonly members, interface versus type alias, declaration merging. | |
| 09 | Classes and Invariants | Access modifiers, strict initialization, and composition over inheritance. | |
| 10 | Generics and Inference | Type parameters, constraints, and designing for inference first. | |
| PHASE 3: ADVANCED TYPE PROGRAMMING | |||
| 11 | Mapped and Conditional Types | Computing new types from existing ones: key remapping, infer, template literals. | |
| 12 | Declaration Files and Augmentation | Reading and writing .d.ts, @types packages, safe module augmentation. | |
| 13 | Modules and Imports | ESM versus CommonJS, verbatimModuleSyntax, resolution and barrel files. | |
| 14 | Decorators and Metadata | Stage 3 versus legacy decorators, metadata patterns, when the trade-off pays. | |
| PHASE 4: PRODUCTION | |||
| 15 | Errors and Runtime Validation | unknown catches, result types, and validating untrusted data with zod. | |
| 16 | Testing TypeScript | What types prove versus what tests prove; typing Vitest suites and mocks. | |
| 17 | Linting, Formatting, CI | typescript-eslint, project references, and the incremental CI pipeline. | |
| 18 | Run and Debug | Source maps, launch configs, and debugging compiled output. | |
| 19 | Migrating JavaScript to TypeScript | The strangler-fig path: allowJs, JSDoc checking, gradual strictness. | |
| 20 | Framework Integration | React, Node APIs, and library authoring with typed boundaries. | |
| 21 | Architecture at Scale | Type layers, project references, and keeping the checker fast in monorepos. | |
| PHASE 5: PRACTICE & DEMO | |||
| 22 | Demo Examples Lab | Runnable single-file TypeScript demos with source and live preview. | |
| 23 | Study Projects | Progressive projects that apply every phase of the track. | |
| 24 | Open-Source Lab | TypeScript repositories on GitHub worth studying, with what to read in each. | |
| PHASE 6: REFERENCE | |||
| 25 | References and Standards | Official documentation, free books and courses, tooling references. | |
Free TypeScript Resources
| Resource | What it is |
|---|---|
| typescriptlang.org/docs | The official handbook and reference — the primary source this track cites. |
| TypeScript Playground | Run and share TypeScript in the browser; test every example without installing anything. |
| Total TypeScript Tutorials | Matt Pocock's free tutorials, from beginner exercises to type-level wizardry. |
| typescript-eslint | The official linting layer for TypeScript-specific rules. |
| TSConfig Reference | Every compiler option, explained by the team that built them. |
| TypeScript Tooling cheatsheets | Community-maintained cheatsheets for real-world setups. |