UNPKG

967 BTypeScriptView Raw
1import { Key } from 'path-to-regexp';
2import { RequestMethods } from '../Server';
3import { RegisteredRouteInterface } from './RegisteredRouteInterface';
4import { RouteInterface } from './RouteInterface';
5import { RouterConfigInterface } from '../Config';
6import { AbstractActionController } from '../Controller';
7export declare class RouterService {
8 private routes;
9 private config;
10 constructor(config: RouterConfigInterface);
11 resolve(method: RequestMethods, target: string): {
12 route: RegisteredRouteInterface;
13 parameters: {};
14 } | null;
15 match(target: string, route: RegisteredRouteInterface): {};
16 registerRoutes(routes: Array<RouteInterface | Array<RouteInterface>>): this;
17 registerRoute(method: RequestMethods, route: string, controller: typeof AbstractActionController, action: string): this;
18 getRegisteredRoutes(): RegisteredRouteInterface[];
19 buildParameters(from: Array<Key>, result: RegExpExecArray): {};
20}