Back to Flow

Announcing User Defined Type Guards in Flow

website/blog/2024-03-05-Announcing-User-Defined-Type-Guards-in-Flow.md

0.313.0277 B
Original Source

:::info[Historical] This post announced user-defined type guards when it was introduced. For current syntax and behavior, see the Type Guards documentation. :::

Flow now lets you define a function that encodes a type predicate over its parameter.