/** * Converts a union type to a tuple type of the same members */ export type TupleUnion = { [S in U]: Exclude extends never ? [...R, S] : TupleUnion, [...R, S]>; }[U] & string[]; export type Nullish = T | null | undefined;