Skip to content

Welshman Docs / @welshman/lib / pick

Function: pick() ​

pick<T>(ks, x): T

Defined in: packages/lib/src/Tools.ts:185

Creates new object with only specified keys

Type Parameters ​

• T extends Obj<any>

Parameters ​

ks ​

string[]

Keys to keep

x ​

T

Source object

Returns ​

T

New object with only specified keys