function both<A, B>(validatorA, validatorB): (x) => x is A & B
Create a validator that combines two validators.
This is useful for validating properties that have been composed of a generic and more specific values.
Type parameters
Type parameter |
---|
A |
B |
Parameters
Returns
Function
Parameters
Parameter | Type |
---|---|
x | unknown |
Returns
x is A & B