Convert a union type to an intersection.
Union type
1.1.0
Useful for merging the members of a union into a single composite type.
type U = { a: string } | { b: number };type I = UnionToIntersection< U >;// { a: string } & { b: number } Copy
type U = { a: string } | { b: number };type I = UnionToIntersection< U >;// { a: string } & { b: number }
Convert a union type to an intersection.