UNPKG

next-server-functions

Version:
12 lines 564 B
import { headers as NextHeaders } from "next/headers"; import { Context, NextFunction } from "./create-app"; import { z } from "zod"; export type HeaderContext = { headers: Awaited<ReturnType<typeof NextHeaders>>; }; export declare const headers: <C extends Context>(ctx: C, next: NextFunction<C>) => Promise<any>; export type ValidateConfig<S extends z.ZodType<any>> = { schema?: S; }; export declare const validate: <C extends Context>(ctx: C, next: NextFunction<C>, config?: ValidateConfig<any>) => Promise<any>; //# sourceMappingURL=middleware.d.ts.map