Skip to main content

assertUndefined

For the complete documentation index, see llms.txt

Midnight.js API Reference v4.0.4


Midnight.js API Reference / @midnight-ntwrk/midnight-js-utils / assertUndefined

Function: assertUndefined()

assertUndefined<A>(value, message?): asserts value is null | undefined

Asserts that the given value is null or undefined.

Type Parameters

A

A

Parameters

value

A | null | undefined

The value to test for nullability.

message?

string

The error message to use if an error is thrown.

Returns

asserts value is null | undefined

Throws

Error If the value is not undefined or null