Languages · FOCUSED GUIDE

Learn TypeScript.

Use types to model data, narrow values, and build safer interfaces.

YOUR LEARNING PATH

TypeScript essentials

Start with the essentials or pick the concept you need.

RECOMMENDED NEXTInterfaces & type aliases
Start learning
01TypeScriptExplore concepts
  1. Interfaces & type aliases2 min
  2. What are generics and utility types?2 min
  3. What are union, intersection, keyof and typeof?2 min
  4. What are unknown, any and never?2 min
  5. How do narrowing and type guards work?2 min
  6. What are mapped types, conditional types and decorators?2 min

What you will study in TypeScript

Focused lessons organized by concept. Start with the explanation, trace the examples, and check your recall before moving on.

TypeScript

Interfaces and type aliases both describe types that TypeScript checks before runtime. An interface is mainly used for object contracts, while a type alias can name object shapes, unions, tuples and other type expressions. Choosing between them is mostly about the shape being modeled and whether declaration merging is needed.

Prerequisites
Related to TypeScript
Expand your skills next