...

/

Mapped Types Introduction

Mapped Types Introduction

This lesson introduces the concept of mapped types.

Overview

Mapped types are another way to transform types. In simple words, they let you take an object type (an interface) and return a new type with each property transformed in some way.

Mapped type example - Readonly type

The best example for understanding mapped types is the built-in Readonly type. As you can see, Readonly is a generic type. It takes an ...