Libraries
    Preparing search index...

    Type Alias Brand<T, TBrand>

    Brand: T & { readonly [K in BRAND]: TBrand }

    Intersects a base type with a phantom brand tag. The brand exists only at the type level — zero runtime cost.

    Type Parameters

    • T
    • TBrand extends string | symbol
    type Email = Brand<string, 'Email'>;
    type UserId = Brand<number, 'UserId'>;