import Macroable, { Macro } from "../Support/Traits/Macroable"; import type { MiddlewareStack } from "../Contracts/Http/Middleware"; import type { RouteCallback, Routes } from "../Contracts/Routing/Route"; import type { CallBack, Class, ObjectOf } from "../Types"; import type Controller from "./Controller"; declare type RouteAction = RouteCallback | [Class, Exclude]; export declare class Router extends Macroable { protected routes: Routes[]; protected prefixStack: string[]; protected middlewareStack: MiddlewareStack[]; protected deep: number; protected calledAction: string; protected static macros: ObjectOf; constructor(); private addRoutes; get: (uri: string, action: RouteAction, ctx?: ObjectOf) => this; post: (uri: string, action: RouteAction, ctx?: ObjectOf) => this; delete: (uri: string, action: RouteAction, ctx?: ObjectOf) => this; patch: (uri: string, action: RouteAction, ctx?: ObjectOf) => this; put: (uri: string, action: RouteAction, ctx?: ObjectOf) => this; all: (uri: string, action: RouteAction, ctx?: ObjectOf) => this; getRoutes(): Routes[]; prefix(prefix: string): this; middleware(middleware: MiddlewareStack): this; group(callback: string | CallBack): Promise; private flattenMiddleware; /** * This method just to reset calledAction when Route facade called * See implementation in Support/Facade class */ protected facadeCalled(): void; /** * determine if the given options should included in particular method */ private methodIncludedByOptions; } export interface Router { macro: (name: string, macro: Macro) => any; [key: string]: any; } declare const _default: typeof Router; export default _default;