Mapped Types

Mapped types allow you to create a new type by transforming properties of an existing type.

type PointUpdate = {
    [P in keyof Point]?: Point[P];


Create a mapped type NullablePoint where each property of the Point type is made nullable (i.e., it can also be null).

Copyright © Read our Terms of Use and Privacy Policy