UNPKG

@t3ned/channel

Version:

Ergonomic, chaining-based Typescript framework for quick API development for Fastify

14 lines 520 B
import type { FastifyRequest } from "fastify"; import { z, ZodTypeAny } from "zod"; export declare const validate: (req: FastifyRequest, schema: Partial<ValidationSchema>) => Promise<z.SafeParseReturnType<{ params?: unknown; query?: unknown; body?: unknown; }, { params?: unknown; query?: unknown; body?: unknown; }>>; export declare type ValidationKey = "params" | "query" | "body"; export declare type ValidationSchema = Record<ValidationKey, ZodTypeAny>; //# sourceMappingURL=validate.d.ts.map