@foxpage/foxpage-manager
Version:
foxpage resource manager
39 lines (38 loc) • 805 B
TypeScript
import { Application, Route, Router } from '@foxpage/foxpage-types';
/**
* foxpage router
* for internal route and dynamic route of customize
*
* @export
* @class RouterInstance
* @implements {Router}
*/
export declare class RouterImpl implements Router {
private routeMap;
private logger;
constructor(app: Application);
/**
* register the route
*
* @param {Route} route
* @return {*}
*/
register(routes: Route[]): void;
/**
* unregister the route
*
* @param {Route} route
*/
unregister(route: Route): void;
/**
* get the route by pathname
*
* @param {string} pathname
* @return {*}
*/
getRoute(pathname: string): Route | null;
/**
* destroy the cache
*/
destroy(): void;
}