Free curriculum
Learn TypeScript, lesson by lesson
Turn JavaScript knowledge into precise TypeScript: begin with everyday annotations, then move through narrowing, generics, mapped types, typed APIs, and application architecture.
The course layers type-system tools onto familiar runtime behavior, ending with configuration, frameworks, API boundaries, and debugging.
Complete curriculum
Work in order, or open any lesson as a public reading reference. Interactive practice remains optional.
- Read lesson →
Lesson 1 · basics · foundations
Introduction to TypeScript
Start learning TypeScript from scratch. Understand why TypeScript improves JavaScript with static types for scalable applications.
- Position
- core · 15 min
- Prerequisites
- None
- Outcomes
- Syntax Fluency
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 2 · basics · foundations
Variables and Types
Learn TypeScript variables and type annotations. Master the type system including unions, literals, and type inference for safer code.
- Position
- core · 20 min
- Prerequisites
- None
- Outcomes
- Syntax Fluency, Data Modeling
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 3 · basics · foundations
Functions
Learn how to write typed functions in TypeScript with optional parameters, overloads, and return types for safer, documented code.
- Position
- core · 20 min
- Prerequisites
- None
- Outcomes
- Syntax Fluency, Abstraction & Design
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 4 · basics · foundations
Control Flow
Learn TypeScript control flow and type narrowing. Use typeof guards and exhaustive checks to write safer conditional logic.
- Position
- core · 25 min
- Prerequisites
- None
- Outcomes
- Syntax Fluency
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 5 · basics · foundations
Data Structures
Learn typed arrays, tuples, and objects in TypeScript. Build type-safe data structures with interfaces, readonly, and generics.
- Position
- core · 25 min
- Prerequisites
- None
- Outcomes
- Data Modeling, Data Structures & Algorithms
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 6 · intermediate · types
Interfaces and Types
Master TypeScript interfaces and type aliases. Learn extending, intersection types, declaration merging, and when to use each.
- Position
- core · 22 min
- Prerequisites
- Data Structures
- Outcomes
- Data Modeling, Abstraction & Design
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 7 · intermediate · types
Enums And Constants
Learn TypeScript enums and const assertions to create named, type-safe constants. Replace magic strings and numbers in your code.
- Position
- core · 25 min
- Prerequisites
- Interfaces and Types, Variables and Types
- Outcomes
- Syntax Fluency, Data Modeling
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 8 · intermediate · types
Type Narrowing
Learn TypeScript type narrowing with typeof, instanceof, in operator, discriminated unions, and user-defined type guards.
- Position
- core · 25 min
- Prerequisites
- Control Flow, Interfaces and Types
- Outcomes
- Security & Robustness, Data Modeling
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 9 · intermediate · types
Classes And OOP
Learn TypeScript classes and OOP with constructors, inheritance, access modifiers, and interfaces for type-safe object-oriented code.
- Position
- core · 28 min
- Prerequisites
- Interfaces and Types, Functions, Type Narrowing
- Outcomes
- Abstraction & Design
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 10 · intermediate · abstraction
Generics
Write reusable, type-safe code with TypeScript generics. Learn generic functions, interfaces, classes, and constraints.
- Position
- core · 25 min
- Prerequisites
- Interfaces and Types
- Outcomes
- Abstraction & Design
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 11 · intermediate · abstraction
Utility Types
Master TypeScript utility types like Partial, Pick, Omit, and Record. Transform existing types without repetition.
- Position
- core · 22 min
- Prerequisites
- Generics
- Outcomes
- Data Modeling, Abstraction & Design
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 12 · intermediate · abstraction
Error Handling
Learn robust TypeScript error handling with try/catch, custom error classes, the Result pattern, and type narrowing for caught errors.
- Position
- core · 20 min
- Prerequisites
- Interfaces and Types, Type Narrowing
- Outcomes
- Security & Robustness, Architecture & Maintainability
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 13 · intermediate · engineering
Async TypeScript
Master async/await in TypeScript with typed Promises, async functions, and error handling patterns for non-blocking, readable code.
- Position
- core · 27 min
- Prerequisites
- Functions, Interfaces and Types, Classes And OOP, Error Handling
- Outcomes
- Performance & Runtime, Security & Robustness
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 14 · intermediate · engineering
Modules
Organize TypeScript code with ES modules. Learn named exports, default exports, type-only imports, re-exports, and barrel files.
- Position
- core · 20 min
- Prerequisites
- Functions, Classes And OOP
- Outcomes
- Architecture & Maintainability
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 15 · intermediate · engineering
Config And Tsconfig
Learn tsconfig.json to configure your TypeScript project. Master strict mode, compiler targets, path aliases, and essential flags.
- Position
- core · 20 min
- Prerequisites
- Introduction to TypeScript, Variables and Types, Interfaces and Types, Type Narrowing, Generics
- Outcomes
- Architecture & Maintainability, Production Delivery
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 16 · intermediate · engineering
Zod And Validation
Learn Zod for runtime schema validation in TypeScript. Parse untrusted data safely and infer types from schemas automatically.
- Position
- core · 25 min
- Prerequisites
- Interfaces and Types, Functions, Generics, Type Narrowing, Error Handling
- Outcomes
- Security & Robustness, Data Modeling
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 17 · intermediate · engineering
Type-Safe APIs
Build type-safe APIs in TypeScript with generic fetch wrappers, discriminated union responses, and runtime type guards.
- Position
- core · 25 min
- Prerequisites
- Interfaces and Types, Generics, Type Narrowing, Async TypeScript
- Outcomes
- Security & Robustness, Architecture & Maintainability
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 18 · intermediate · engineering
Debugging TypeScript
Learn to read TypeScript error messages, use the type system for debugging, write exhaustiveness checks, and apply runtime techniques.
- Position
- core · 25 min
- Prerequisites
- Introduction to TypeScript, Variables and Types, Interfaces and Types, Type Narrowing
- Outcomes
- Testing & Debugging
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 19 · advanced · capstone
Capstone Project: Type-Safe Learning Tracker
Build a headless, strict-mode learning tracker across four milestones: a discriminated-union domain model, a generics-backed service, a hand-rolled validation layer that parses unknown input, and a narrowing-driven console report with an exhaustiveness check.
- Position
- capstone · 30 min
- Prerequisites
- Zod And Validation
- Outcomes
- Architecture & Maintainability, Data Modeling, Abstraction & Design
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 20 · advanced · extensions
Mapped Types
Learn TypeScript mapped types to transform, filter, and reshape types programmatically. Build your own Partial, Required, and Readonly.
- Position
- extension · 25 min
- Prerequisites
- Interfaces and Types, Generics, Type Narrowing
- Outcomes
- Abstraction & Design, Data Modeling
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 21 · advanced · extensions
Advanced Patterns
Master advanced TypeScript patterns: discriminated unions, template literal types, conditional types, infer, and branded types.
- Position
- extension · 28 min
- Prerequisites
- Utility Types, Type Narrowing
- Outcomes
- Abstraction & Design, Data Modeling
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 22 · advanced · extensions
Testing
Write type-safe tests in TypeScript with assertion patterns, mocking, and test organization for reliable, maintainable test suites.
- Position
- extension · 25 min
- Prerequisites
- Error Handling, Utility Types
- Outcomes
- Testing & Debugging
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 23 · advanced · extensions
Decorators
Learn TypeScript decorators to add metadata and behavior to classes, methods, and properties. Used in Angular, NestJS, and TypeORM.
- Position
- extension · 25 min
- Prerequisites
- Generics
- Outcomes
- Abstraction & Design
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 24 · advanced · extensions
React and TypeScript
Type React components, props, hooks, events, and context with TypeScript. Catch UI bugs at compile time and build self-documenting code.
- Position
- extension · 25 min
- Prerequisites
- Interfaces and Types, Generics
- Outcomes
- Production Delivery, Abstraction & Design
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 25 · advanced · extensions
Next.js and TypeScript
Apply TypeScript to Next.js patterns including typed page props, API responses, server actions, and generic data fetching.
- Position
- extension · 28 min
- Prerequisites
- Interfaces and Types, Generics, Type Narrowing, Async TypeScript
- Outcomes
- Production Delivery, Architecture & Maintainability
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.