/** From https://www.npmjs.com/package/@telokys/ts-meta-types#debugterface */ export type Debug = Terface extends infer O ? { [K in keyof O]: O[K]; } : never; /** Creates a union of all keys of all objects in the Terface union */ export type AllKeys = Terface extends any ? keyof Terface & (string | number | symbol) : never; /** Creates a new interface adding the missing keys to Terface */ export type Wrap = Terface & { [K in Exclude]?: undefined; }; /** Distributes the union and automatically add the missing keys */ export type BetterUXWrapper = AllKeys> = Terface extends any ? Wrap : never; /** Builds a tuple containing N times the type T. */ export type Tuple = N extends N ? number extends N ? T[] : _TupleOf : never; type _TupleOf = R["length"] extends N ? R : _TupleOf; export {};