import { Handler, Middleware, ExtractRouteParams } from "../types/http.js"; import { Context } from "./context.js"; /** * Executes middleware functions in order, then the final handler. * Fully promise-based to handle async middleware properly. * * @param ctx The Context object that will be passed through the middleware chain and to the handler. * Its `params` property's type is inferred from the `Path` generic. * @param middlewares An array of Middleware functions. These are kept as `Middleware` for flexibility, * relying on context augmentation via declaration merging and runtime checks. * @param handler The final Handler function for the route. Its `ctx` parameter * will be strictly typed based on the `Path`. */ export declare function runMiddlewares(ctx: Context>, middlewares: Middleware[], handler: Handler>>): Promise; //# sourceMappingURL=middleware.d.ts.map