0Pricing
TypeScript Academy · Lesson

Mapped Types

Learn how to transform existing types into new ones using mapped types, providing flexibility in handling dynamic data structures.

1

Introduction to Mapped Types

Mapped types allow you to transform existing types into new ones by applying operations to each property in a type.

They are powerful for creating flexible, reusable type structures in TypeScript.

Mapped Types — illustration 1

2

What are Mapped Types?

Mapped types use syntax like { [P in keyof T]: T[P] } to iterate over the properties of a type T.

All lessons in this course

  1. Keyof and Lookup Types
  2. Mapped Types
  3. Intersection and Union Types
← Back to TypeScript Academy