@itrocks/route
Version:
Domain-driven route manager with automatic generation, decorators, and static routes
14 lines (13 loc) • 447 B
TypeScript
import { Type } from '@itrocks/class-type';
import { Destination } from './destination';
export type RouteTree = {
[name: string]: Destination | RouteTree;
};
export declare class Routes {
routes: RouteTree;
add(path: string, destination: Destination): void;
destination(route: string): Destination | undefined;
resolve(route: string): Function | Type | undefined;
simplify(): void;
summarize(route: string): string;
}