UNPKG

winterspec

Version:

Write Winter-CG compatible routes with filesystem routing and tons of features

8 lines (7 loc) 645 B
import type { GlobalSpec } from "./types/global-spec.js"; import type { MiddlewareChain } from "./middleware/types.js"; import type { CreateWithRouteSpecFn } from "./types/route-spec.js"; import type { ResponseTypeToContext } from "./types/context.js"; import { WinterSpecRequest, WinterSpecRouteFn } from "./types/web-handler.js"; export declare const createWithWinterSpec: <const GS extends GlobalSpec>(globalSpec: GS) => CreateWithRouteSpecFn<GS>; export declare function wrapMiddlewares(middlewares: MiddlewareChain, routeFn: WinterSpecRouteFn<any, any, any>, request: WinterSpecRequest, ctx: ResponseTypeToContext<Response>): Promise<any>;