isDefAndNotNull

function isDefAndNotNull<F>(val): val is F

Returns true if the specified value is defined and not null.

Type parameters

Type parameter
F

Parameters

ParameterTypeDescription
valundefined | null | FVariable to test.

Returns

val is F

Whether variable is defined and not null.