enum_

View Source

Summary

Create a schema that accepts one of the given values using strict equality (===).

Signature

function enum_<values extends readonly [unknown, unknown]>(
  values: values,
): Schema<unknown, values[number]>;

Params

values

Returns

A schema that produces the union of allowed value types