Pick keys from the shape that matches the given `Condition`.
5
6
This is useful when you want to create a new type from a specific subset of an existing type. For example, you might want to pick all the primitive properties from a class and form a new automatically derived type.
7
8
@example
9
```
10
import type {Primitive, ConditionalPick} from 'type-fest';
11
12
class Awesome {
13
name: string;
14
successes: number;
15
failures: bigint;
16
17
run() {}
18
}
19
20
type PickPrimitivesFromAwesome = ConditionalPick<Awesome, Primitive>;