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

ZodLiteral

import { ZodLiteral } from "https://esm.sh/zod@3.25.76/index.d.cts";
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]