nyx Typedoc
Preparing search index...
@nyx-discord/djs
ensureKey
Function ensureKey
ensureKey
<
K
extends
string
|
number
|
symbol
,
I
extends
object
,
V
>
(
input
:
I
,
key
:
K
,
valueIfNotPresent
:
Exclude
<
V
,
undefined
>
,
)
:
asserts
input
is
I
&
Record
<
K
,
V
>
Type safely sets a value if it's undefined or non present, useful for filling partials.
Type Parameters
K
extends
string
|
number
|
symbol
I
extends
object
V
Parameters
input
:
I
key
:
K
valueIfNotPresent
:
Exclude
<
V
,
undefined
>
Returns
asserts
input
is
I
&
Record
<
K
,
V
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Documentation
Loading...
Type safely sets a value if it's undefined or non present, useful for filling partials.