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

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

simple, easy-to-use, and declarative input validator; supports Node.js, TypeScript, Deno, and Bun
Latest
function enumeration
import { enumeration } from "https://deno.land/x/value_schema@v4.0.0/dist-deno/exporter.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