someValue

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

ParameterType
...valuesT

Returns

Function

Parameters

ParameterType
xunknown

Returns

x is T[number]