pick()
Param
Source object.
Param
Unconstrained iterable of keys to pick, such as in array or Map.
pick(input, scalarEnum, transform)
function pick<O, K>(
input,
scalarEnum,
transform?): Pick<O, StringKeyOf<O>>
Type Parameters
Type Parameter |
---|
O extends object |
K extends string |
Parameters
Parameter | Type | Description |
---|---|---|
input | O | Source object. |
scalarEnum | Record <K , K > | Unconstrained scalar enum whose values present in input will be used as keys, such as an enum-like object. |
transform ? | (value , key , input ) => any | - |
Returns
Pick
<O
, StringKeyOf
<O
>>
A subset of the source object with only properties present in constraints
.
A subset of the source object with only properties present in scalarEnum
.
Param
Source object.
Param
Unconstrained iterable of keys to pick, such as in array or Map.
pick(input, setLike, transform)
function pick<O, K>(
input,
setLike,
transform?): Pick<O, K>
Type Parameters
Type Parameter |
---|
O extends object |
K extends string | number | symbol |
Parameters
Parameter | Type | Description |
---|---|---|
input | O | Source object. |
setLike | SetLike <K > | Set-like object whose members represent the subset of keys to pick. |
transform ? | (value , key , input ) => any | - |
Returns
Pick
<O
, K
>
A subset of the source object with only properties present in constraints
.
A subset of the source object with only properties present in scalarEnum
.
Param
Source object.
Param
Unconstrained iterable of keys to pick, such as in array or Map.
pick(input, scalarEnum, transform)
function pick<O, K>(
input,
scalarEnum,
transform?): Pick<O, StringKeyOf<O>>
Type Parameters
Type Parameter |
---|
O extends object |
K extends string | number | symbol |
Parameters
Parameter | Type | Description |
---|---|---|
input | O | Source object. |
scalarEnum | Record <K , K > | Enum-like object whose members represent the subset of keys to pick. |
transform ? | (value , key , input ) => any | - |
Returns
Pick
<O
, StringKeyOf
<O
>>
A subset of the source object with only properties present in constraints
.
A subset of the source object with only properties present in scalarEnum
.
Param
Source object.
Param
Unconstrained iterable of keys to pick, such as in array or Map.
pick(input, constraints, transform)
function pick<O, K>(
input,
constraints,
transform?): Pick<O, K>
Type Parameters
Type Parameter | Default type |
---|---|
O extends object | - |
K extends string | number | symbol | Extract <keyof O , string > |
Parameters
Parameter | Type | Description |
---|---|---|
input | O | Source object. |
constraints | Iterable <K , any , any > | Unconstrained iterable of keys to pick, such as in array or Map. |
transform ? | (value , key , input ) => any | - |
Returns
Pick
<O
, K
>
A subset of the source object with only properties present in constraints
.
A subset of the source object with only properties present in constraints
.
Param
Source object.
Param
Unconstrained iterable of keys to pick, such as in array or Map.
pick(input, constraints, transform)
function pick<O, K>(
input,
constraints,
transform?): Pick<O, K>
Type Parameters
Type Parameter | Default type |
---|---|
O extends object | - |
K extends string | number | symbol | Extract <keyof O , string > |
Parameters
Parameter | Type | Description |
---|---|---|
input | O | Source object. |
constraints | Record <K , K > | Enum-like object whose members represent the subset of keys to pick. |
transform ? | (value , key , input ) => any | - |
Returns
Pick
<O
, K
>
A subset of the source object with only properties present in constraints
.
A subset of the source object with only properties present in constraints
.
Param
Source object.
Param
Unconstrained iterable of keys to pick, such as in array or Map.
pick(input, keys, transform)
function pick<O, K>(
input,
keys,
transform?): Pick<O, StringKeyOf<O>>
Type Parameters
Type Parameter |
---|
O extends object |
K extends string |
Parameters
Parameter | Type | Description |
---|---|---|
input | O | Source object. |
keys | Iterable <K , any , any > | Unconstrained iterable of keys to pick, such as in array or Map. |
transform ? | (value , key , input ) => any | - |
Returns
Pick
<O
, StringKeyOf
<O
>>
A subset of the source object with only properties present in constraints
.
A subset of the source object with only properties present in keys
.
Param
Source object.
Param
Unconstrained iterable of keys to pick, such as in array or Map.