Skip to content

Function: $isNotNil()

ts
function $isNotNil<T>(value: T): value is NonNullable<T>;

Check whether a value is not nil-compatible in Lua and Jest runtimes.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
valueTValue to check.

Returns

value is NonNullable<T>

Whether value is neither null nor undefined.