/** * Internal minimal HTTP router. Not exported from the package. * Matches requests by method + pathname, calls first matching handler. */ import type { IncomingMessage, ServerResponse } from 'node:http'; export type RequestHandler = (req: IncomingMessage, res: ServerResponse) => void | Promise; interface Route { method: string; path: string; handler: RequestHandler; } export declare function createRouter(routes: Route[]): RequestHandler; export declare function parseJsonBody>(req: IncomingMessage): Promise; export declare function parseFormBody(req: IncomingMessage): Promise>; export declare function jsonResponse(res: ServerResponse, status: number, body: unknown): void; export declare function htmlResponse(res: ServerResponse, status: number, html: string): void; export {}; //# sourceMappingURL=router.d.ts.map