/** * Router creation and lifecycle management. * @module bquery/router */ import type { Router, RouterOptions } from './types'; /** * Creates and initializes a router instance. * * @param options - Router configuration * @returns The router instance * * @example * ```ts * import { createRouter } from 'bquery/router'; * * const router = createRouter({ * routes: [ * { path: '/', component: () => import('./pages/Home') }, * { path: '/about', component: () => import('./pages/About') }, * { path: '/user/:id(\\d+)', component: () => import('./pages/User') }, * { path: '/old-page', redirectTo: '/new-page' }, * { path: '*', component: () => import('./pages/NotFound') }, * ], * base: '/app', * scrollRestoration: true, * }); * * router.beforeEach((to, from) => { * if (to.path === '/admin' && !isAuthenticated()) { * return false; // Cancel navigation * } * }); * ``` */ export declare const createRouter: (options: RouterOptions) => Router; //# sourceMappingURL=router.d.ts.map