objectValidatorWithInvalidFieldTracking

function objectValidatorWithInvalidFieldTracking<T>(validatorStructure): (subject, invalidFields?, level) => subject is DestructureGuardedTypeObj<T>

This validator functions the same as objectValidator, with the option of passing in a map
which will track all of the fields that were found to be invalid.

Type parameters

Type parameter
T extends object

Parameters

ParameterType
validatorStructureT

Returns

Function

Parameters

ParameterTypeDefault value
subjectunknownundefined
invalidFields?Map<number, unknown[]>undefined
level?number0

Returns

subject is DestructureGuardedTypeObj<T>