Type Alias Unliteral<TinputType>

Unliteral<TinputType>: TinputType extends string
    ? string
    : TinputType extends number
        ? number
        : TinputType extends boolean
            ? boolean
            : TinputType extends symbol
                ? symbol
                : TinputType

Convert all literal types to their base type, eg 'foobar' => string, 123 => number, true => boolean, etc.

Type Parameters

  • TinputType