@witchcraft/spellcraft
Github
Issues
npm
Preparing search index...
core/createKey
createKey
Function createKey
createKey
<
TId
extends
string
=
string
,
TKey
extends
Mutable
<
Pick
<
Key
<
TId
>
,
"id"
>
&
Partial
<
Omit
<
Key
<
TId
>
,
"id"
>
>
>
=
Mutable
<
Pick
<
Key
<
TId
>
,
"id"
>
&
Partial
<
Omit
<
Key
<
TId
>
,
"id"
>
>
,
>
,
>
(
id
:
TId
,
rawKey
?:
Omit
<
TKey
,
"id"
>
,
)
:
Result
<
Key
<
TId
>
,
KnownError
<
"INVALID_VARIANT"
>
>
Creates a key.
Type Parameters
TId
extends
string
=
string
@internal
See ./README.md Collection Entries
TKey
extends
Mutable
<
Pick
<
Key
<
TId
>
,
"id"
>
&
Partial
<
Omit
<
Key
<
TId
>
,
"id"
>
>
>
=
Mutable
<
Pick
<
Key
<
TId
>
,
"id"
>
&
Partial
<
Omit
<
Key
<
TId
>
,
"id"
>
>
>
Parameters
id
:
TId
See
Key.id
rawKey
:
Omit
<
TKey
,
"id"
>
= ...
Returns
Result
<
Key
<
TId
>
,
KnownError
<
"INVALID_VARIANT"
>
>
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
Github
Issues
npm
@witchcraft/spellcraft
Loading...
Creates a key.