summaryrefslogtreecommitdiff
path: root/cli/bench/testdata/npm/hono/dist/router/trie-router/node.d.ts
blob: a489b17f67ac8f303d0c8244a949152fe5d481c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import type { Result } from '../../router';
import type { Pattern } from '../../utils/url';
declare type HandlerSet<T> = {
    handler: T;
    score: number;
    name: string;
};
export declare class Node<T> {
    methods: Record<string, HandlerSet<T>>[];
    children: Record<string, Node<T>>;
    patterns: Pattern[];
    order: number;
    name: string;
    handlerSetCache: Record<string, HandlerSet<T>[]>;
    constructor(method?: string, handler?: T, children?: Record<string, Node<T>>);
    insert(method: string, path: string, handler: T): Node<T>;
    private getHandlerSets;
    search(method: string, path: string): Result<T> | null;
}
export {};