TypeScript · Beginner to advanced · 42 lessons ready
TypeScript for beginners
A free TypeScript course for people who know basic JavaScript. Short lessons with real compiler output cover everyday types, functions, narrowing, generics, utility types, classes, modules, tooling and a final typed project.
YOUR NEXT SKILL
From curious to confident.
Learners who know basic JavaScript (variables, functions, objects, arrays and promises). No earlier TypeScript or typed-language experience is needed. You need Node.js and a text editor.
- Explain what TypeScript adds to JavaScript and how the compiler checks and emits code
- Type variables, functions, objects, arrays and tuples, and read compiler errors with confidence
- Combine types with unions, intersections and interfaces, and narrow them safely
- Write generic functions and types with constraints, keyof and indexed access
- Use utility, mapped, conditional and template literal types for real problems
- Configure strict mode and tsconfig, type modules, async code and the DOM, and migrate a JavaScript project
ONE STEP AT A TIME
Your TypeScript learning path
Read, experiment, and check what you know. Your completed lessons stay marked as you go.
Getting started
Everyday types
Functions
Combining and narrowing types
- Union types: a value that can be one of several types13 min
- Narrowing with typeof, truthiness and equality checks14 min
- Type guards: instanceof, in and custom predicates14 min
- Discriminated unions and exhaustive checks15 min
- Intersection types: combining object types12 min
- Interfaces and how they differ from type aliases14 min
- Enums and their alternatives14 min
- Type assertions, non-null assertions and satisfies15 min
Generics
Advanced types
Classes
Modules, async code and tooling
Real-world TypeScript
Final exam and certificate
Finish all 42 lessons to unlock a 15-question exam on TypeScript. Pass it and you get a certificate with a public link you can share.
Sign in to take the exam