import { a as HttpMethod, H as HandlerType, L as LexerToken, R as Request, b as MiddlewareProvider, d as RouteCheck, c as Response } from './Middleware-_f55_WPA.mjs'; import 'http'; declare class Route { methods: HttpMethod[]; path: string; handler: HandlerType; private middlewares; private checks; private urlRegex; constructor(methods: HttpMethod[], path: string, handler: HandlerType); pathToRegex(path: string): RegExp; lexUrlPath(path: string): { type: string; value: string; }[]; tokensToRegex(tokens: LexerToken[]): RegExp; /** * to evaluadate if request is a match for this route * @param request http request * @returns return true if route is a match for this request */ test(request: Request): boolean; testPath(pathname: string): boolean; /** * returns details of the match, otherwise it returns false * @param request the request to match * @returns object cotaining details of match including matched params */ match(request: Request): false | { url: URL; params: { [key: string]: string; }; }; prependMiddleware(middlewares: MiddlewareProvider | MiddlewareProvider[]): this; addMiddleware(middlewares: MiddlewareProvider | MiddlewareProvider[]): this; getMiddlewares(): MiddlewareProvider[]; addCheck(checks: RouteCheck | RouteCheck[]): this; getChecks(): RouteCheck[]; callHanlder(request: Request, response: Response): any; } export { Route };