Function: pick()
pick<
T,K>(source, ...keys):Pick<T,K>
Create a new object with a subset of fields from a source object.
Type Parameters
T
T
K
K extends string | number | symbol
Parameters
source
T
Object to pick fields from.
keys
...K[]
Names of fields to pick.
Returns
Pick<T, K>
New object with only the picked fields.