Design System Utilities @ 0.1.1-alpha.0
GitHub
by Maddi Mathon
Preparing search index...
objectGenerator
Function objectGenerator
objectGenerator
<
T_Keys
extends
string
|
number
,
T_Return
extends
unknown
>
(
keys
:
T_Keys
[]
|
readonly
T_Keys
[]
,
mapper
:
(
key
:
T_Keys
)
=>
T_Return
,
)
:
{
[
K
in
string
|
number
]
:
T_Return
}
Takes an array of keys and a callback function to easily construct a typed object.
Type Parameters
T_Keys
extends
string
|
number
T_Return
extends
unknown
Parameters
keys
:
T_Keys
[]
|
readonly
T_Keys
[]
mapper
:
(
key
:
T_Keys
)
=>
T_Return
Returns
{
[
K
in
string
|
number
]
:
T_Return
}
Since
0.1.0-alpha
Settings
Member Visibility
Alpha
Beta
External
Inherited
Private
Protected
Theme
OS
Light
Dark
GitHub
by Maddi Mathon
Design System Utilities @ 0.1.1-alpha.0
Loading...
Takes an array of keys and a callback function to easily construct a typed object.