@grace-js/grace
Version:
An opinionated API framework
19 lines • 603 B
TypeScript
import { AnyRoute } from "../routes/route.js";
import { RouteMatch, Router } from "./router.js";
export declare class TrieNode {
children: Map<string, TrieNode>;
dynamicChild: TrieNode | null;
dynamicParamName: string | null;
regexChild: TrieNode | null;
regex: RegExp | null;
isEndOfPath: boolean;
routes: Map<string, AnyRoute>;
constructor();
}
export declare class TrieRouter implements Router {
root: TrieNode;
constructor();
addRoute(route: AnyRoute): void;
match(path: string, method: string): RouteMatch | null;
}
//# sourceMappingURL=trie.d.ts.map