IsUnion type

Helper type to determine if a type is a union.

export type IsUnion<T> = [T] extends [UnionToIntersection<T>] ? false : true;