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
| Parameter | Type |
|---|---|
validatorStructure | T |
Returns
Function
Parameters
| Parameter | Type | Default value |
|---|---|---|
subject | unknown | undefined |
invalidFields? | Map<number, unknown[]> | undefined |
level? | number | 0 |
Returns
subject is DestructureGuardedTypeObj<T>