...

/

Definition and Usages

Definition and Usages

In this lesson, we will set the groundwork for the upcoming lessons on the mapped type.

What is the mapped type?

The mapped type allows for creating a new type from an existing one. Using the term map refers to pointing existing members to a new type by a custom logic that is unique to the mapper implementation.

A good example is to have an existing interface keep all the same members, but make them optional or read-only.

Advantages of the mapped type

First advantage

The mapped type has two advantages over the previous versions ...