⚝
One Hat Cyber Team
⚝
Your IP:
172.22.0.1
Server IP:
151.80.20.34
Server:
Linux 794f04d97d5e 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
Server Software:
Apache/2.4.62 (Debian)
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
node_modules
/
type-fest
/
source
/
View File Name :
conditional-pick.d.ts
import {ConditionalKeys} from './conditional-keys'; /** Pick keys from the shape that matches the given `Condition`. 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. @example ``` import {Primitive, ConditionalPick} from 'type-fest'; class Awesome { name: string; successes: number; failures: bigint; run() {} } type PickPrimitivesFromAwesome = ConditionalPick<Awesome, Primitive>; //=> {name: string; successes: number; failures: bigint} ``` @example ``` import {ConditionalPick} from 'type-fest'; interface Example { a: string; b: string | number; c: () => void; d: {}; } type StringKeysOnly = ConditionalPick<Example, string>; //=> {a: string} ``` */ export type ConditionalPick<Base, Condition> = Pick< Base, ConditionalKeys<Base, Condition> >;