type-alias
Source: base.ts ↗
UnionToIntersection
Convert union type to intersection type.
export type UnionToIntersection<T> = (T extends any ? (x: T) => any : never) extends (x: infer R) => any ? R : never;
Example
number | string | boolean is resolved as number & string & boolean
Type1 | Type2 | Type3 is resolved as Type1 & Type2 & Type3