import type { Context } from '../context.js'; type MiddlewareFn = (ctx: Context, next: () => Promise) => any; interface FileRoutingOptions { routesDir: string; basePath?: string; extensions?: string[]; conventions?: { layout?: string; error?: string; loading?: string; notFound?: string; }; cacheRoutes?: boolean; hot?: boolean; } interface RouteModule { GET?: RouteHandler; POST?: RouteHandler; PUT?: RouteHandler; DELETE?: RouteHandler; PATCH?: RouteHandler; OPTIONS?: RouteHandler; HEAD?: RouteHandler; default?: RouteHandler; middleware?: Middleware[]; layout?: LayoutComponent; metadata?: RouteMetadata; } type RouteHandler = (ctx: Context) => Promise | any; type Middleware = (ctx: Context, next: () => Promise) => Promise | any; type LayoutComponent = (ctx: Context, children: any) => Promise | any; interface RouteMetadata { title?: string; description?: string; middleware?: string[]; auth?: boolean; roles?: string[]; rateLimit?: number; } interface ParsedRoute { path: string; filePath: string; pattern: string; params: string[]; isDynamic: boolean; isLayout: boolean; isCatchAll: boolean; priority: number; } /** * File-based routing plugin with Next.js-style conventions * * Features: * - Automatic route generation from file structure * - Dynamic routes with [...slug] and [id] patterns * - Route groups with (group) syntax * - Nested layouts * - Middleware composition per route * - Hot reload support * - TypeScript-first */ export declare function fileRouting(options: FileRoutingOptions): MiddlewareFn; /** * Watch for file changes and reload routes (hot reload) */ export declare function watchRoutes(routesDir: string, _app: any, _options: Omit): Promise; export { type FileRoutingOptions, type RouteModule, type RouteMetadata, type ParsedRoute }; //# sourceMappingURL=fileRouting.d.ts.map