import { HookContext } from './base.js'; export type RegularMiddleware = (context: T) => Promise | any; export interface RegularHookMap { before?: RegularMiddleware[]; after?: RegularMiddleware[]; error?: RegularMiddleware[]; } export declare const runHook: (hook: RegularMiddleware, context: any, type?: string) => Promise; export declare const runHooks: (hooks: RegularMiddleware[]) => (context: any) => Promise; export declare function fromBeforeHook(hook: RegularMiddleware): (context: any, next: any) => Promise; export declare function fromAfterHook(hook: RegularMiddleware): (context: any, next: any) => any; export declare function fromErrorHook(hook: RegularMiddleware): (context: any, next: any) => any; export declare function collect({ before, after, error, }: RegularHookMap): (this: any, context: any, next?: import("./compose.js").AsyncMiddleware | undefined) => Promise;