function exclude<T, U>(validator, excludeValidator): (x) => x is Exclude<U, T>
Create a validator that allows types excluding those that satisfy an excludeValidator.
Type parameters
Type parameter |
---|
T |
U |
Parameters
Parameter | Type |
---|---|
validator | (x ) => x is U |
excludeValidator | (x ) => x is T |
Returns
Function
Parameters
Parameter | Type |
---|---|
x | unknown |
Returns
x is Exclude<U, T>