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
| Parameter | Type |
|---|---|
subValidator | (p1) => p1 is T |
Returns
Function
A validator for the array type
Parameters
| Parameter | Type |
|---|---|
p1 | unknown |
Returns
p1 is T[]