Skip to main content
Module

x/zod/index.ts>z.ZodOptional

TypeScript-first schema validation with static type inference
Extremely Popular
Latest
class z.ZodOptional
extends ZodType<T["_output"] | undefined, ZodOptionalDef<T>, T["_input"] | undefined>
import { z } from "https://deno.land/x/zod@v3.23.6/index.ts";
const { ZodOptional } = z;

Type Parameters

T extends ZodTypeAny

Methods

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

Static Properties

create: <T extends ZodTypeAny>(type: T, params?: RawCreateParams) => ZodOptional<T>