1 import {Except} from './except';
2 import {ConditionalKeys} from './conditional-keys';
5 Exclude keys from a shape that matches the given `Condition`.
7 This is useful when you want to create a new type with a specific set of keys from a shape. For example, you might want to exclude all the primitive properties from a class and form a new shape containing everything but the primitive properties.
11 import {Primitive, ConditionalExcept} from 'type-fest';
21 type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
22 //=> {run: () => void}
27 import {ConditionalExcept} from 'type-fest';
36 type NonStringKeysOnly = ConditionalExcept<Example, string>;
37 //=> {b: string | number; c: () => void; d: {}}
40 export type ConditionalExcept<Base, Condition> = Except<
42 ConditionalKeys<Base, Condition>