From T, pick a set of properties whose type are assignable to P.
T
P
type T = { foo: string, bar: bigint | boolean, baz: number,}PickByType<T,true>; // Result: {}PickByType<T,number>; // Result: { baz: number } Copy
type T = { foo: string, bar: bigint | boolean, baz: number,}PickByType<T,true>; // Result: {}PickByType<T,number>; // Result: { baz: number }
From
T
, pick a set of properties whose type are assignable toP
.