@iopa/router
Version:
Lightweight and fast router for IOPA applications
15 lines • 489 B
TypeScript
import type { ParamMap, IRouterContext } from './node';
import { Node } from './node';
export type { ParamMap } from './node';
export declare type ReplacementMap = number[];
interface IInitOptions {
reverse: boolean;
}
export declare class Trie {
context: IRouterContext;
root: Node;
constructor({ reverse }?: IInitOptions);
insert(path: string, index: number): ParamMap;
buildRegExp(): [RegExp, ReplacementMap, ReplacementMap];
}
//# sourceMappingURL=trie.d.ts.map