hono
Version:
Web framework built on Web Standards
15 lines (14 loc) • 423 B
TypeScript
import type { Result, Router } from '../../router';
export declare class SmartRouter<T> implements Router<T> {
name: string;
routers: Router<T>[];
routes?: [
string,
string,
T
][];
constructor(init: Pick<SmartRouter<T>, "routers">);
add(method: string, path: string, handler: T): void;
match(method: string, path: string): Result<T>;
get activeRouter(): Router<T>;
}