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.

25 lessonsAbout 600 minutesThe runner executes TypeScript with tsx in a server sandbox, without browser DOM APIs.

Complete curriculum

Work in order, or open any lesson as a public reading reference. Interactive practice remains optional.

  1. Lesson 1 · basics

    Introduction to TypeScript

    Start learning TypeScript from scratch. Understand why TypeScript improves JavaScript with static types for scalable applications.

    Read lesson →
    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.
  2. 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.

    Read lesson →
    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.
  3. Lesson 3 · basics

    Functions

    Learn how to write typed functions in TypeScript with optional parameters, overloads, and return types for safer, documented code.

    Read lesson →
    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.
  4. Lesson 4 · basics

    Control Flow

    Learn TypeScript control flow and type narrowing. Use typeof guards and exhaustive checks to write safer conditional logic.

    Read lesson →
    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.
  5. Lesson 5 · basics

    Data Structures

    Learn typed arrays, tuples, and objects in TypeScript. Build type-safe data structures with interfaces, readonly, and generics.

    Read lesson →
    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.
  6. Lesson 6 · intermediate

    Interfaces and Types

    Master TypeScript interfaces and type aliases. Learn extending, intersection types, declaration merging, and when to use each.

    Read lesson →
    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.
  7. Lesson 7 · intermediate

    Generics

    Write reusable, type-safe code with TypeScript generics. Learn generic functions, interfaces, classes, and constraints.

    Read lesson →
    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.
  8. Lesson 8 · intermediate

    Modules

    Organize TypeScript code with ES modules. Learn named exports, default exports, type-only imports, re-exports, and barrel files.

    Read lesson →
    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.
  9. 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.

    Read lesson →
    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.
  10. Lesson 10 · intermediate

    Utility Types

    Master TypeScript utility types like Partial, Pick, Omit, and Record. Transform existing types without repetition.

    Read lesson →
    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.
  11. Lesson 11 · advanced

    Decorators

    Learn TypeScript decorators to add metadata and behavior to classes, methods, and properties. Used in Angular, NestJS, and TypeORM.

    Read lesson →
    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.
  12. Lesson 12 · advanced

    Testing

    Write type-safe tests in TypeScript with assertion patterns, mocking, and test organization for reliable, maintainable test suites.

    Read lesson →
    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.
  13. 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.

    Read lesson →
    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.
  14. Lesson 14 · advanced

    Advanced Patterns

    Master advanced TypeScript patterns: discriminated unions, template literal types, conditional types, infer, and branded types.

    Read lesson →
    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.
  15. Lesson 15 · advanced

    Capstone Project

    Build a type-safe task management system combining generics, discriminated unions, utility types, and advanced TypeScript patterns.

    Read lesson →
    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.
  16. 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.

    Read lesson →
    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.
  17. Lesson 17 · intermediate

    Type Narrowing

    Learn TypeScript type narrowing with typeof, instanceof, in operator, discriminated unions, and user-defined type guards.

    Read lesson →
    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.
  18. Lesson 18 · intermediate

    Classes And OOP

    Learn TypeScript classes and OOP with constructors, inheritance, access modifiers, and interfaces for type-safe object-oriented code.

    Read lesson →
    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.
  19. Lesson 19 · intermediate

    Async TypeScript

    Master async/await in TypeScript with typed Promises, async functions, and error handling patterns for non-blocking, readable code.

    Read lesson →
    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.
  20. Lesson 20 · advanced

    Zod And Validation

    Learn Zod for runtime schema validation in TypeScript. Parse untrusted data safely and infer types from schemas automatically.

    Read lesson →
    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.
  21. Lesson 21 · advanced

    Mapped Types

    Learn TypeScript mapped types to transform, filter, and reshape types programmatically. Build your own Partial, Required, and Readonly.

    Read lesson →
    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.
  22. 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.

    Read lesson →
    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.
  23. Lesson 23 · intermediate

    Type-Safe APIs

    Build type-safe APIs in TypeScript with generic fetch wrappers, discriminated union responses, and runtime type guards.

    Read lesson →
    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.
  24. Lesson 24 · basics

    Config And Tsconfig

    Learn tsconfig.json to configure your TypeScript project. Master strict mode, compiler targets, path aliases, and essential flags.

    Read lesson →
    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.
  25. Lesson 25 · intermediate

    Debugging TypeScript

    Learn to read TypeScript error messages, use the type system for debugging, write exhaustiveness checks, and apply runtime techniques.

    Read lesson →
    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.