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

x/pup/deps.ts>z.ZodEnum

Universal process manager built in Deno
Go to Latest
class z.ZodEnum
extends ZodType<T[number], ZodEnumDef<T>>
import { z } from "https://deno.land/x/pup@1.0.0-rc.9/deps.ts";
const { ZodEnum } = z;

Type Parameters

T extends [string, ...string[]]

Properties

readonly
enum: Values<T>
readonly
Enum: Values<T>
readonly
options
readonly
Values: Values<T>

Methods

_parse(input: ParseInput): ParseReturnType<this["_output"]>
exclude<ToExclude extends readonly [T[number], ...T[number][]]>(values: ToExclude): ZodEnum<typecast<Writeable<FilterEnum<T, ToExclude[number]>>, [string, ...string[]]>>
extract<ToExtract extends readonly [T[number], ...T[number][]]>(values: ToExtract): ZodEnum<Writeable<ToExtract>>