IsUnion type
Helper type to determine if a type is a union.
export type IsUnion<T> = [T] extends [UnionToIntersection<T>] ? false : true;
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Helper type to determine if a type is a union.
export type IsUnion<T> = [T] extends [UnionToIntersection<T>] ? false : true;