← All Exercises

Mapped Types

advancedtypescript~30min

Background

Mapped types are the foundation of utility types like Partial, Required, and Readonly in TypeScript.

Problem

Use mapped types to create readonly, partial, and pick versions of existing types.

Input

Existing type definitions

Output

Transformed type structures

Sample tests

Sample 1

Input: Partial<User>
Expected: all properties optional

Your solution

Learning objective

Learn advanced type transformations and utility type creation