Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

enumUtil.d.ts 609B

12345678
  1. export declare namespace enumUtil {
  2. type UnionToIntersectionFn<T> = (T extends unknown ? (k: () => T) => void : never) extends (k: infer Intersection) => void ? Intersection : never;
  3. type GetUnionLast<T> = UnionToIntersectionFn<T> extends () => infer Last ? Last : never;
  4. type UnionToTuple<T, Tuple extends unknown[] = []> = [T] extends [never] ? Tuple : UnionToTuple<Exclude<T, GetUnionLast<T>>, [GetUnionLast<T>, ...Tuple]>;
  5. type CastToStringTuple<T> = T extends [string, ...string[]] ? T : never;
  6. export type UnionToTupleString<T> = CastToStringTuple<UnionToTuple<T>>;
  7. export {};
  8. }