Skip to main content

assertUndefined

For the complete documentation index, see llms.txt

Midnight.js API Reference v2.0.2


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