@resee-movies/utilities - v0.8.0
    Preparing search index...

    Type Alias UnionToIntersection<T>

    UnionToIntersection: (T extends any ? (x: T) => any : never) extends (
        x: infer R,
    ) => any
        ? R
        : never

    Converts a union of types into an intersection of those same types.

    type Union = { size: string } | { color: string };
    type Intersection = UnionToIntersection<Union>;
    // => { size: string } & { color: string }

    Type Parameters

    • T