ts-type-forge
    Preparing search index...

    Type Alias NormalizeBrandUnion<B>

    NormalizeBrandUnion: GetBrandValuePart<B> & TSTypeForgeInternals_BrandEncapsulated<
        {
            readonly [key in Exclude<UnwrapBrandKeys<B>, UnwrapBrandBooleanKeys<B>>]: B[key]
        },
    >

    Normalizes a union of branded types by removing keys that have become true | false. This happens when different brands in a union have the same key with different boolean values.

    Type Parameters

    Normalized brand with boolean keys removed

    type Brand1 = Brand<number, 'validated', 'empty'>;
    type Brand2 = Brand<number, 'empty', 'validated'>;
    type UnionBrand = Brand1 | Brand2;
    type Normalized = NormalizeBrandUnion<UnionBrand>;
    // Both 'validated' and 'empty' are removed since they're true | false