Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

z.ZodLiteral

import { z } from "https://esm.sh/zod@3.25.76/index.d.cts"; 

const { ZodLiteral } = z;
class ZodLiteral<T> extends ZodType<T, ZodLiteralDef<T>, T> {
get value(): T;
 
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
 
static create: <Value extends Primitive>(value: Value, params?: RawCreateParams) => ZodLiteral<Value>;
}

§Type Parameters

§Extends

§
ZodType<T, ZodLiteralDef<T>, T>
[src]

§Properties

§
value: T readonly
[src]

§Methods

§
_parse(input: ParseInput): ParseReturnType<this["_output"]>
[src]

§Static Properties

§
create: <Value extends Primitive>(value: Value, params?: RawCreateParams) => ZodLiteral<Value>
[src]