Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/zod/index.ts>z.ZodTransformer

TypeScript-first schema validation with static type inference
Extremely Popular
Go to Latest
class z.ZodTransformer
extends ZodType<Output, ZodEffectsDef<T>, Input>
import { z } from "https://deno.land/x/zod@v3.22.1/index.ts";
const { ZodTransformer } = z;

Type Parameters

T extends ZodTypeAny
optional
Output = output<T>
optional
Input = input<T>

Methods

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

Static Properties

create: <I extends ZodTypeAny>(
schema: I,
effect: Effect<I["_output"]>,
params?: RawCreateParams,
) => ZodEffects<I, I["_output"]>
createWithPreprocess: <I extends ZodTypeAny>(
preprocess: (arg: unknown, ctx: RefinementCtx) => unknown,
schema: I,
params?: RawCreateParams,
) => ZodEffects<I, I["_output"], unknown>