$enum
Callable
Type parameters
- Values: string[]
Parameters
values: Values
The values that are allowed on this property.
optionaloptions: SchemaOptions<object, Values[number]>
Additional options to pass to the enum.
Returns EnumType<Values>
The values that are allowed on this property.
Additional options to pass to the enum.
Declares an
EnumType
. This is either a list of values, or a dictionary where the key is the name of value.Example