Skip to main content
Module

x/zod/types.ts>ZodOptional

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

Type Parameters

T extends ZodTypeAny

Methods

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

Static Properties

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