@midnight-ntwrk/midnight-js-utils v0.2.5 • API
Midnight.js API Reference v0.2.5 / @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
Parameters
• value: undefined
| null
| A
The value to test for nullability.
• 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