@pleisto/active-support
    Preparing search index...

    Type Alias UnionToIntersection<U>

    UnionToIntersection: (U extends U ? (x: U) => unknown : never) extends (
        x: infer R,
    ) => unknown
        ? R
        : never

    The UnionToIntersection type in TypeScript is used to convert a union type to an intersection type. This can be useful when you have a union type that contains multiple types, and you want to use the properties of all of those types in a single type or value.

    Type Parameters

    • U
     const data: UnionToIntersection<{ a: string } | { b: string }> = { a: 'hello', b: 'world' }