Midnight.js API Reference v1.0.0
Midnight.js API Reference / @midnight-ntwrk/midnight-js-utils / assertUndefined
Function: assertUndefined()
assertUndefined<
A
>(value
,message
?): asserts value is undefined | null
Asserts that the given value is null or undefined.
Type Parameters
A
A
Parameters
value
The value to test for nullability.
undefined
| null
| A
message?
string
The error message to use if an error is thrown.
Returns
asserts value is undefined | null
Throws
Error If the value is not undefined or null