isDefinedArray

function isDefinedArray<T>(val): val is T[]

Returns true if the specified value is an array and every element is defined and not null.

Type parameters

Type parameter
T

Parameters

ParameterTypeDescription
val(undefined | null | T)[]Variable to test.

Returns

val is T[]

Whether variable is an array of defined and not null elements.