Skip to content

UnionToIntersection

Transform a Union type to an Intersection type.

import { UnionToIntersection } from 'crustack/types'
type I = UnionToIntersection<{ a: string } | { b: number }>
// I = { a: string } & { b: number }