import { ZodType } from "https://deno.land/x/doz@v3-snapshot-2021-01-21/mod.ts";
Constructors
new
ZodType(def: Def)Properties
readonly
_def: Defreadonly
_input: Inputreadonly
_output: Output_refinement: (refinement: InternalCheck<Output>["check"]) => this
readonly
_type: Outputarray: () => ZodArray<this>
The .check method has been removed in Zod 3. For details see https://github.com/colinhacks/zod/tree/v3.
The .is method has been removed in Zod 3. For details see https://github.com/colinhacks/zod/tree/v3.
nullable: () => ZodNullableType<this>
optional: () => ZodOptionalType<this>
parse: (x: unknown, params?: ParseParams) => Output
parseAsync: (x: unknown, params?: ParseParams) => Promise<Output>
refinement: (check: (arg: Output) => any, refinementData: MakeErrorData | ((arg: Output, ctx: RefinementCtx) => MakeErrorData)) => unknown
transform: <Out, This extends this>(transformer: (arg: Output) => Out | Promise<Out>) => This extends ZodTransformer<infer T, any> ? ZodTransformer<T, Out> : ZodTransformer<This, Out>
Methods
default<T extends Input, This extends this = this>(def: T): ZodTransformer<ZodOptional<This>, Input>
default<T extends (arg: this) => Input, This extends this = this>(def: T): ZodTransformer<ZodOptional<This>, Input>