Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/value_schema/dist-deno/schemas/enumeration.ts>enumeration

simple, easy-to-use, and declarative input validator; supports Node.js, TypeScript, Deno, and Bun
Go to Latest
function enumeration
import { enumeration } from "https://deno.land/x/value_schema@v4.0.0-rc.2/dist-deno/schemas/enumeration.ts";

schema for enum-like (enum / union) or null or undefined

Type Parameters

optional
E = unknown

Returns

EnumerationSchema<E, null | undefined>

schema for enum-like (enum / union) or undefined

Type Parameters

optional
E = unknown

schema for enum-like (enum / union) or null

Type Parameters

optional
E = unknown

schema for enum-like (enum / union)

Type Parameters

optional
E = unknown