devtypes
    Preparing search index...

    Type Alias Box<T>

    Box: T extends string
        ? String
        : T extends number
            ? Number
            : T extends boolean ? Boolean : T extends Symbol ? Symbol : T

    Convert a union of primitive literals to a union of corresponding boxed types

    Type Parameters

    • T
    type Boxed = Box<'hello' | 42 | true>; // String | Number | Boolean