Skip to main content
Module

x/zod/mod.ts>z.ZodNativeEnum

TypeScript-first schema validation with static type inference
Extremely Popular
Go to Latest
class z.ZodNativeEnum
extends ZodType<T[keyof T], ZodNativeEnumDef<T>, T[keyof T]>
import { z } from "https://deno.land/x/zod@v3.23.6/mod.ts";
const { ZodNativeEnum } = z;

Type Parameters

T extends EnumLike

Properties

readonly
enum

Methods

_parse(input: ParseInput): ParseReturnType<T[keyof T]>

Static Properties

create: <T extends EnumLike>(values: T, params?: RawCreateParams) => ZodNativeEnum<T>