function partialObjectValidator<T>(validatorStructure): (subject) => subject is Partial<DestructureGuardedTypeObj<T>>
Creates a validator which tests if the target is an object
and if the structure of the object matches the structure of the passed-in
validator object, but with every entry being optional.
Type parameters
Type parameter |
---|
T extends object |
Parameters
Parameter | Type |
---|---|
validatorStructure | T |
Returns
Function
Parameters
Parameter | Type |
---|---|
subject | unknown |
Returns
subject is Partial<DestructureGuardedTypeObj<T>>