/** * Build a router route table from a file-route manifest. * * The manifest is whatever a bundler glob (`import.meta.glob`) or a hand-written * map gives you: `{ './routes/users/[id]/+page.ts': () => import(...) }`. This * stays bundler-agnostic — no filesystem, no bundled build tool — and produces * plain {@link RouteDefinition}s consumable by `createRouter()` (client) and the * SSR router bridge (server). * * @module bquery/router */ import type { CreateFileRoutesOptions, CreateFileRoutesResult, FileRoute, RouteManifest } from './types'; /** * Build navigable route definitions and normalised file-route entries from a * manifest. * * @example * ```ts * // Vite/Rollup/webpack: a glob gives you the manifest for free. * const pages = import.meta.glob('./routes/**\/+page.ts'); * const { routes } = createFileRoutes(pages); * const router = createRouter({ routes }); * ``` * * @example * ```ts * // Zero-build: hand-write the manifest, no bundler needed. * const { routes } = createFileRoutes({ * './routes/index.ts': () => import('./routes/index.ts'), * './routes/users/[id]/+page.ts': () => import('./routes/users/[id]/+page.ts'), * }); * ``` */ export declare const createFileRoutes: (manifest: RouteManifest, options?: CreateFileRoutesOptions) => CreateFileRoutesResult; /** * Sort routes so that the existing first-match router resolves the most * specific pattern: static segments beat dynamic params at the same depth, and * catch-all routes always sort last. * * @internal */ export declare const sortEntriesBySpecificity: (entries: FileRoute[]) => void; //# sourceMappingURL=routes.d.ts.map