/** * Flatten a structure of nested tuples/arrays into a flat element type. */ export type Flatten = { '1': Flatten ? U : T>; }[T extends number ? '1' : '1'];