Back to Flow

Announcing Partial & Required Flow utility types + catch annotations

website/blog/2023-03-15-Announcing-Partial-and-Required-Flow-utility-types-and-catch-annotations.md

0.312.1425 B
Original Source

:::info[Historical] This post announced Partial, Required, and catch annotations when it was introduced. For current syntax and behavior, see the Utility Types documentation. :::

Starting in Flow version 0.201, make an object type’s fields all optional using Partial<ObjType> (use instead of the unsafe $Shape), and make an object type’s optional fields required with Required<ObjType>.