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.
true | false
The brand union to normalize
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 Copy
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
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.