UNPKG

@nahkies/typescript-express-runtime

Version:

Runtime package for code generated by @nahkies/openapi-code-generator using the typescript-express template

6 lines (5 loc) 507 B
import type { z } from "zod"; import { type RequestInputType } from "./errors"; export declare function parseRequestInput<Schema extends z.ZodTypeAny>(schema: Schema, input: unknown, type: RequestInputType): z.infer<Schema>; export declare function parseRequestInput(schema: undefined, input: unknown, type: RequestInputType): undefined; export declare function responseValidationFactory(possibleResponses: [string, z.ZodTypeAny][], defaultResponse?: z.ZodTypeAny): (status: number, value: unknown) => any;