x/zod/external.ts

TypeScript-first schema validation with static type inference
Very Popular
Go to Latest
class ZodFunction
extends ZodType<OuterTypeOfFunction<Args, Returns>, ZodFunctionDef<Args, Returns>, InnerTypeOfFunction<Args, Returns>>
import { ZodFunction } from "https://deno.land/x/zod@v3.17.3/external.ts?s=ZodFunction";

Type Parameters

Args extends ZodTuple<any, any>[src]
Returns extends ZodTypeAny[src]

Methods

_parse(input: ParseInput): ParseReturnType<any>[src]
args<Items extends Parameters<ZodTuple["create"]>[0]>(...items: Items): ZodFunction<ZodTuple<Items, ZodUnknown>, Returns>[src]
implement<F extends InnerTypeOfFunction<Args, Returns>>(func: F): F[src]
parameters()[src]
returns<NewReturnType extends ZodType<any, any>>(returnType: NewReturnType): ZodFunction<Args, NewReturnType>[src]
returnType()[src]
strictImplement(func: InnerTypeOfFunction<Args, Returns>): InnerTypeOfFunction<Args, Returns>[src]

Static Properties

create: <T extends ZodTuple<any, any> = ZodTuple<[], ZodUnknown>, U extends ZodTypeAny = ZodUnknown>(
args?: T,
returns?: U,
params?: RawCreateParams,
) => ZodFunction<T, U>
[src]