UNPKG

diesel-core

Version:

Web framework built on Web Standards

25 lines (24 loc) 619 B
import type { handlerFunction, HttpMethod, RouteT } from "./types"; declare class TrieNode { children: Record<string, TrieNode>; isEndOfWord: boolean; handler: handlerFunction[]; isDynamic: boolean; pattern: string; path: string; method: string[]; constructor(); } export default class Trie { root: TrieNode; constructor(); insert(path: string, route: RouteT): void; search(path: string, method: HttpMethod): { path: string; handler: handlerFunction; isDynamic: boolean; pattern: string; method: string; } | null; } export {};