arrayValidator

function arrayValidator<T>(subValidator): (p1) => p1 is T[]

Creates a validator which tests if the target is an array
and if all elements of the array satisfy the given
sub-validator.

Type parameters

Type parameter
T

Parameters

ParameterType
subValidator(p1) => p1 is T

Returns

Function

A validator for the array type

Parameters

ParameterType
p1unknown

Returns

p1 is T[]