function someValue<T>(...values): (x) => x is T[number]
Creates a validator that the given unknown is one of the supplied values
Type parameters
Type parameter |
---|
T extends (string | number | symbol )[] |
Parameters
Parameter | Type |
---|---|
...values | T |
Returns
Function
Parameters
Parameter | Type |
---|---|
x | unknown |
Returns
x is T[number]