Vinyl
Preparing search index...
@amzn/vinyl-validation
isOneOf
Function isOneOf
isOneOf
<
const
U
extends
readonly
Primitive
[]
>
(
...
possibleValues
:
U
,
)
:
ValueSchema
<
U
[
number
]
>
Creates a validator that asserts that the input is nullish or one of the given possible values.
Type Parameters
const
U
extends
readonly
Primitive
[]
Parameters
...
possibleValues
:
U
Returns
ValueSchema
<
U
[
number
]
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Vinyl
Loading...
Creates a validator that asserts that the input is nullish or one of the given possible values.