Skip to content

isNothing

isNothing(x): x is typeof Nothing

Checks if x is Nothing.

Example

isNothing(Nothing)
// => true
isNothing(1234)
// => false
isNothing("foobar")
// => false

Parameters

x

unknown

The value to check.

Returns

x is typeof Nothing

true if x is Nothing, false otherwise.

See

isJust