import { FatcherContext, FatcherFunctionalMiddleware, FatcherResponse } from './types'; /** * Compose middlewares to a higher-order function. * * If want to change request context.Should pass a new request context to `next()`. * * If don't want to change result, should return `next()` * * @param middlewares array of middlewares. * @returns * A async function of promise chain. * * @examples * * ```ts * async function use(context: Context, next: Next) { * //pass a new context to lower middlewares. * const result = await next({ * method: 'GET', * }) * * // pass result to upper middlewares * return result; * } * ``` */ export declare function composeMiddlewares(middlewares: FatcherFunctionalMiddleware[]): (init: FatcherContext) => Promise;