import type { IncomingMessage, ServerResponse } from 'node:http';
export type Handler = (req: IncomingMessage, res: ServerResponse, params: Record<string, string>) => Promise<void> | void;
export interface Route {
    method: string;
    pattern: RegExp;
    paramNames: string[];
    handler: Handler;
}
export declare class Router {
    private routes;
    on(method: string, pathPattern: string, handler: Handler): void;
    handle(req: IncomingMessage, res: ServerResponse): Promise<boolean>;
}
