ts-type-forge
    Preparing search index...

    Type Alias UnwrapBrandBooleanKeys<B>

    UnwrapBrandBooleanKeys: ExtractBooleanKeys<B>

    Extracts all keys that have boolean values (not specifically true or false) from a branded type. This occurs when a brand union normalizes and a key becomes true | false.

    Type Parameters

    • B extends UnknownBrand

      The branded type to extract keys from

    Union of string literal keys that have boolean values

    type Brand1 = Brand<number, 'key1', never>;
    type Brand2 = Brand<number, never, 'key1'>;
    type UnionBrand = Brand1 | Brand2;
    type BooleanKeys = UnwrapBrandBooleanKeys<UnionBrand>; // 'key1' (since it's true | false)