import { Concat } from '../../array'; import { ToFnIntersection } from '../ToFnIntersection'; /** * * Utility type to convert a union type to a tuple * * 유니온 타입을 튜플로 변환하는 유틸리티 타입 * * @param T Union type to convert / 변환할 유니온 타입 * * @returns Tuple type containing each member of the union type / 유니온 타입의 각 멤버를 포함하는 튜플 타입 * * @example * type cases = [ * Expect['length'], 2>>, * Expect>, 'a' | 'b'>>, * Expect>, 'a'>>, * Expect>, any>>, * Expect>, void | 1>>, * Expect>, never>>, * ] * * @link https://www.utilscript.site/docs/usage-union/to-tuple * */ export type ToTuple = ToFnIntersection extends () => infer R ? Concat>, [R]> : [];