PokéRogue
    Preparing search index...

    Type Alias UnwrapBrand<T>

    UnwrapBrand: IfNotAnyOrNever<T, { ifNot: _UnwrapBrand<T, Primitive> }>

    Returns the base type of a branded type.

    Type Parameters

    • T
    type Brand = {readonly __brand: unique symbol};

    type A = UnwrapBrand<string & Brand>;
    //=> string

    type B = UnwrapBrand<number & Brand>;
    //=> number

    type C = UnwrapBrand<PropertyKey & Brand>;
    //=> PropertyKey

    type D = UnwrapBrand<(1 | 200n | 'foo' | 'bar') & Brand>;
    //=> 1 | 200n | 'foo' | 'bar'