Module

x/zod/external.ts>ZodDefault

TypeScript-first schema validation with static type inference
Extremely Popular
Go to Latest
class ZodDefault
extends ZodType<util.noUndefined<T["_output"]>, ZodDefaultDef<T>, T["_input"] | undefined>
import { ZodDefault } from "https://dotland.deno.dev/x/zod@v3.21.3/external.ts";

Type Parameters

T extends ZodTypeAny

Methods

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

Static Properties

create: <T extends ZodTypeAny>(type: T, params: RawCreateParams & { default: T["_input"] | (() => util.noUndefined<T["_input"]>); }) => ZodDefault<T>