import { Equal } from '../Equal'; import { If } from '../If'; import { IsNever } from '../IsNever'; /** * * Type to check if a type is a union * * 타입이 유니온인지 확인하는 타입 * * @param T Type to check / 확인할 타입 * * @returns Whether the type is a union / 타입이 유니온인지 여부 * * @example * type cases = [ * Expect, false>>, * Expect, true>>, * Expect, true>>, * Expect, true>>, * Expect, true>>, * Expect, false>>, * Expect, false>>, * // Cases where T resolves to a non-union type. * Expect, false>>, * Expect, false>>, * Expect, false>>, * Expect, false>>, * Expect, false>>, * ] * * @link https://www.utilscript.site/docs/usage-commonness/is-union * */ export type IsUnion = If, false, T extends Original ? If, false, true> : never>;