mapValidator

function mapValidator<T>(subValidator): (x) => x is Object

Creates a validator which tests if the target is an object
and if all values in the object satisfy the given sub-validator.
This does not perform any tests on the object keys, which
are allowed to be arbitrary strings.

Type parameters

Type parameter
T

Parameters

ParameterType
subValidator(p1) => p1 is T

Returns

Function

A validator for the map
Note that unlike objectValidator, this performs no validation on the names or
number of the keys and treats all values equally

Parameters

ParameterType
xunknown

Returns

x is Object