Announcing User Defined Type Guards in Flow
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.