🎠predicate
Validate the type T is a union.
T
Nurbol Alpysbayev
https://stackoverflow.com/questions/53953814/typescript-check-if-a-type-is-a-union
type R = IsUnion<'a' | 'b'> // truetype R = IsUnion<boolean> // truetype R = IsUnion<number> // false Copy
type R = IsUnion<'a' | 'b'> // truetype R = IsUnion<boolean> // truetype R = IsUnion<number> // false
🎠predicate
Validate the type
T
is a union.