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
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
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
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
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
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
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
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 8 · intermediate
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
- Outcomes
- Architecture & Maintainability
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 9 · intermediate
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
- Outcomes
- Security & Robustness, Architecture & Maintainability
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 10 · intermediate
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 11 · advanced
Decorators
Learn TypeScript decorators to add metadata and behavior to classes, methods, and properties. Used in Angular, NestJS, and TypeORM.
- Position
- core · 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 12 · advanced
Testing
Write type-safe tests in TypeScript with assertion patterns, mocking, and test organization for reliable, maintainable test suites.
- Position
- core · 25 min
- Prerequisites
- Error Handling
- Outcomes
- Testing & Debugging
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 13 · advanced
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
- core · 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 14 · advanced
Advanced Patterns
Master advanced TypeScript patterns: discriminated unions, template literal types, conditional types, infer, and branded types.
- Position
- core · 28 min
- Prerequisites
- Utility Types
- Outcomes
- Abstraction & Design, Data Modeling
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 15 · advanced
Capstone Project
Build a type-safe task management system combining generics, discriminated unions, utility types, and advanced TypeScript patterns.
- Position
- core · 30 min
- Prerequisites
- Advanced Patterns
- 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 16 · basics
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 17 · intermediate
Type Narrowing
Learn TypeScript type narrowing with typeof, instanceof, in operator, discriminated unions, and user-defined type guards.
- Position
- core · 25 min
- Prerequisites
- Interfaces and Types, Utility 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 18 · intermediate
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 19 · intermediate
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
- Outcomes
- Performance & Runtime, Security & Robustness
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 20 · advanced
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
- Outcomes
- Security & Robustness, Data Modeling
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 21 · advanced
Mapped Types
Learn TypeScript mapped types to transform, filter, and reshape types programmatically. Build your own Partial, Required, and Readonly.
- Position
- core · 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 22 · advanced
Next.js and TypeScript
Apply TypeScript to Next.js patterns including typed page props, API responses, server actions, and generic data fetching.
- Position
- core · 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.
- Read lesson →
Lesson 23 · intermediate
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 24 · basics
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
- Outcomes
- Architecture & Maintainability, Production Delivery
- Runtime / version
- The runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.
- Read lesson →
Lesson 25 · intermediate
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.