import { MiddlewareComposite } from '../middlewares/composite-sync.js'; import type { Middleware, MiddlewareResult, SpecialNextParam } from '../middlewares/shared.js'; import { type UriTemplate } from '../uri-template/index.js'; export interface Routable { path: string; params?: Record; } export type RouteBuilderArguments = [route: string | UriTemplate]; export type RouteBuilder = (...args: RouteBuilderArguments) => MiddlewareRoute; export declare class MiddlewareRoute extends MiddlewareComposite { routePath: UriTemplate; constructor(route: string | UriTemplate); route(...args: RouteBuilderArguments): MiddlewareRoute; isApplicable?: (x: T[0]) => boolean; handle(...context: T): MiddlewareResult; useMiddleware(route: string | UriTemplate, ...middlewares: Middleware[]): this; useMiddleware(...middlewares: Middleware[]): this; use(route: string | UriTemplate, ...middlewares: ((...args: T) => unknown)[]): this; use(...middlewares: ((...args: T) => unknown)[]): this; }