import { Route } from './route.js'; import { Router } from './router.js'; import { PendingRoute as PendingRouteContract, RouteHandler } from '@supercharge/contracts'; export declare class PendingRoute implements PendingRouteContract { /** * The router instance. */ private readonly router; /** * Stores attributes (prefix, middleware, etc.) for a route or route group. */ private readonly attributes; /** * Create a new pending route instance. */ constructor(router: Router); /** * Assign the given `prefix` to a route path or all routes defined in a route group. */ prefix(prefix: string): PendingRoute; /** * Assign the given `middleware` stack to a route or all routes defined in a route group. */ middleware(middleware: string | string[]): PendingRoute; /** * Create a new route group. */ group(callback: () => void): void; /** * Returns the route path with a possibly available prefix. */ private createPathFor; /** * Returns the configured route-level middleware stack. */ private getMiddleware; /** * Create a GET route. */ get(path: string, handler: RouteHandler): Route; /** * Create a POST route. */ post(path: string, handler: RouteHandler): Route; /** * Create a PUT route. */ put(path: string, handler: RouteHandler): Route; /** * Create a DELETE route. */ delete(path: string, handler: RouteHandler): Route; /** * Create a PATCH route. */ patch(path: string, handler: RouteHandler): Route; /** * Create an OPTIONS route. */ options(path: string, handler: RouteHandler): Route; }