UnionToIntersection
Home > @gooddata/sdk-ui > UnionToIntersection
UnionToIntersection type
Convert union type to intersection type.
Signature:
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