import Context from './context.js'; import type { ResponseLike } from './context.js'; export type Handler = (ctx: Context) => Promise | ResponseLike; interface RouteMatch { handler: Handler; params: Record; middlewares: string[]; } declare class TrieNode { part: string; handlers: Map; staticChildren: Map; paramChild: TrieNode | null; paramName: string | null; wildcardChild: TrieNode | null; isParam: boolean; isWildcard: boolean; routeKey: string | null; constructor(part: string, isParam?: boolean, isWildcard?: boolean); } export default class Router { root: TrieNode; private routeTable; private routeCache; private cacheEnabled; add(method: string, path: string, handler: Handler, middlewares?: string[]): void; find(method: string, path: string): RouteMatch | null; getRoutes(): { method: string; path: string; middlewares: string[]; }[]; clearCache(): void; enableCache(enabled?: boolean): void; getCacheStats(): { size: number; enabled: boolean; }; private _split; } export {}; //# sourceMappingURL=router.d.ts.map