Learn TypeScript, the typed version of JavaScript used by most large web projects. Each day explains one idea with diagrams, real TypeScript you can edit and type-check in your browser, and a quick knowledge check.
- 14 days
- ~30 min / day
- Intermediate
- Free account required
The big picture
Everything you'll cover, and how it fits together.
Day by day
Go at your own pace. Your progress is remembered on this device.
- 3Day 3Coming soon 30 min
Functions
Type parameters, return values and callbacks.
ParametersReturn typesFunction types - 4Day 4Coming soon 30 min
Objects & Interfaces
Describe the shape of your data.
Object typesinterfaceOptional & readonly - 5Day 5Coming soon 30 min
Union Types
Values that can be one of several types.
UnionsLiteral typesDiscriminated unions - 6Day 6Coming soon 30 min
Narrowing
Help TypeScript work out the exact type.
typeof & inType guardsnever - 7Day 7Coming soon 30 min
Arrays, Tuples & Enums
Collections and fixed sets of values.
Tuplesreadonlyas const - 8Day 8Coming soon 30 min
Generics
Write code that works with any type, safely.
Generic functionsConstraintsGeneric types - 9Day 9Coming soon 30 min
Classes
Typed classes, access modifiers and interfaces.
public / privateimplementsabstract - 10Day 10Coming soon 30 min
Utility Types
Built-in helpers that transform types.
Partial & RequiredPick & OmitRecord - 11Day 11Coming soon 30 min
Advanced Types
keyof, mapped and conditional types.
keyof & typeofMapped typesConditional types - 12Day 12Coming soon 30 min
Modules & Declarations
Share types across files and use typed libraries.
import type.d.ts files@types - 13Day 13Coming soon 30 min
Async Code & APIs
Type promises and data from the outside world.
Promise<T>Typing API dataRuntime validation - 14Day 14Coming soon 30 min
Projects & Tooling
tsconfig, strict mode and a small typed project.
tsconfig.jsonStrict modeMini project