import type { IncomingMessage } from "http"; import { Context } from "./classes.js"; import type { JetRoute } from "./types.js"; declare class TrieNode { children: Map; parameterChild?: TrieNode; paramName?: string; wildcardChild?: TrieNode; handler?: JetRoute; constructor(); } /** * Represents the Trie data structure for storing and matching URL routes. */ export declare class Trie { root: TrieNode; method: string; hashmap: Record; constructor(method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS' | 'HEAD' | 'CONNECT' | 'TRACE'); /** * Inserts a route path and its associated handler into the Trie. * Exact paths (no parameters or wildcards) go to hashmap for O(1) lookup. * Dynamic paths (with : or *) go to Trie for pattern matching. */ insert(path: string, handler: JetRoute): void; get_responder(req: IncomingMessage | Request, res: any): Context | undefined; get_responder_fast(req: Request, res: unknown): Context | undefined; } export declare const getCtx: (req: IncomingMessage | Request, res: any, path: string, route: JetRoute, params?: Record) => Context; export declare const getScratchCtx: (req: Request, res: unknown, path: string, route: JetRoute, params?: Record) => Context; export declare const returnScratchCtx: (ctx: Context) => void; export declare function preSeedPool(count: number): void; export declare let _cloneJsonHeaders: () => Record; export declare function _rebuildCorsCloner(): void; export declare const ctxPool: Context[]; export declare const MAX_POOL_SIZE = 500; export declare let runtime: Record<"bun" | "deno" | "node" | "edge" | "cloudflare_worker" | "aws_lambda", boolean>; export declare const isNode: boolean; export {};