import type { Method, RequestOptions, ResponseOptions, StatusResponse } from '@stackpress/lib/types'; import type EntryRouter from './plugin/EntryRouter.js'; import type ImportRouter from './plugin/ImportRouter.js'; import type ViewRouter from './plugin/ViewRouter.js'; import ActionRouter from './plugin/ActionRouter.js'; import type { AnyRouterAction, ControllerMountable } from './types.js'; import Request from './Request.js'; import Response from './Response.js'; export default class Router { readonly action: ActionRouter; readonly entry: EntryRouter; readonly import: ImportRouter; readonly view: ViewRouter; get entries(): Map>; get expressions(): typeof this.action.expressions; get imports(): Map>>; get listeners(): typeof this.action.listeners; get routes(): Map; get views(): Map>; constructor(); all(path: string, action: AnyRouterAction, priority?: number): this; connect(path: string, action: AnyRouterAction, priority?: number): this; delete(path: string, action: AnyRouterAction, priority?: number): this; emit(event: string, req: Request, res: Response): Promise; get(path: string, action: AnyRouterAction, priority?: number): this; head(path: string, action: AnyRouterAction, priority?: number): this; mount(...controllers: ControllerMountable[]): this; on(event: string | RegExp, action: AnyRouterAction, priority?: number): this; options(path: string, action: AnyRouterAction, priority?: number): this; patch(path: string, action: AnyRouterAction, priority?: number): this; post(path: string, action: AnyRouterAction, priority?: number): this; put(path: string, action: AnyRouterAction, priority?: number): this; request(init?: Partial>): Request; resolve(event: string, request?: Request | Record, response?: Response): Promise>>; resolve(method: Method | '*', path: string, request?: Request | Record, response?: Response): Promise>>; response(init?: Partial>): Response; route(method: Method, path: string, action: AnyRouterAction, priority?: number): this; trace(path: string, action: AnyRouterAction, priority?: number): this; use>(router: T): this; protected _resolveEvent(event: string, request?: Request | Record, response?: Response): Promise; start?: number; end?: number; stack?: import("@stackpress/lib/types").Trace[]; } & { results: T; total?: number; }>>>; protected _resolveRoute(method: string, path: string, request?: Request | Record, response?: Response): Promise; start?: number; end?: number; stack?: import("@stackpress/lib/types").Trace[]; } & { results: T; total?: number; }>>>; }