import { IncomingMessage, ServerResponse } from "http"; import { Next } from "./helpers"; interface Params { [key: string]: string; } interface HandlerArg { req: Req & { routePath: string; }; res: Res; params: Params; } type Handler = (arg: HandlerArg) => void | Promise; interface Route { method: string; routePath: string; handler: Handler; } export declare class Router { routes: Route[]; constructor(); use(pathPrefix: Router | string, router?: Router): this; _registerHandler(method: string, routePath: string, handler: Handler): this; get(routePath: string, handler: Handler): this; post(routePath: string, handler: Handler): this; put(routePath: string, handler: Handler): this; patch(routePath: string, handler: Handler): this; delete(routePath: string, handler: Handler): this; createHandler(): (req: Req, res: Res, next: Next) => void; } export {};