/** * @jorvel/runtime — server-side router utilities * * The browser router (`router.ts`) uses `window` / `history`. This module * provides a minimal request-scoped router safe for SSR. **Do not** rely on a * process-level singleton in concurrent SSR — create one router per request * with `createServerRouter(path)` (or `withServerRouter(path, fn)` for * AsyncLocalStorage scoping when available). */ import type { Router, RouterOptions } from './router.js'; export type { Router, RouterOptions }; export declare function createServerRouter(path: string, _opts?: RouterOptions): Router; /** * Run `fn` with a per-request router available via `getServerRouter()`. * Falls back to passing the router to `fn` directly when AsyncLocalStorage * is unavailable (edge runtimes). */ export declare function withServerRouter(path: string, fn: (router: Router) => T | Promise): Promise; export declare function getServerRouter(path?: string): Router; /** Replace the fallback singleton. Tests / single-threaded environments only. */ export declare function setServerPath(path: string): void; /** @internal */ export declare function _resetServerRouter(): void; //# sourceMappingURL=server-router.d.ts.map