import { Request } from './Request'; import { Response } from './Response'; export type RouteAction = any; export interface Route { method: string; path: string; action: RouteAction; middleware: any[]; } export declare class Router { protected routes: Route[]; protected groupStack: any[]; protected middlewareGroups: Record; group(attributes: any, callback: (router: Router) => void): void; get(path: string, action: RouteAction): this; post(path: string, action: RouteAction): this; put(path: string, action: RouteAction): this; delete(path: string, action: RouteAction): this; patch(path: string, action: RouteAction): this; options(path: string, action: RouteAction): this; /** * Add middleware to the last registered route. */ middleware(middleware: any | any[]): this; protected addRoute(method: string, path: string, action: RouteAction): this; protected mergeGroupAttributes(): any; protected prefixPath(prefix: string, path: string): string; dispatch(request: Request, response: Response): Promise; protected findRoute(request: Request): Route | null; protected matchPath(routePath: string, requestPath: string, request: Request): boolean; protected runRoute(route: Route, request: Request, response: Response): Promise; private toResponse; } //# sourceMappingURL=Router.d.ts.map