@jay-js/system
Version:
A powerful and flexible TypeScript library for UI, state management, lazy loading, routing and managing draggable elements in modern web applications.
29 lines (28 loc) • 925 B
TypeScript
import type { TRouteInstance, TRouterOptions } from "../types";
/**
* Default configuration options for the router
* @type {TRouterOptions}
*/
export declare const routerOptions: TRouterOptions;
/**
* Map of resolved routes indexed by their unique IDs
* @type {Map<string, TRouteInstance>}
*/
export declare const resolvedRoutes: Map<string, TRouteInstance>;
/**
* Configures the router with the specified options
*
* This function allows customizing router behavior by providing configuration options.
* It handles special cases like resolving string targets to DOM elements.
*
* @param {Partial<TRouterOptions>} options - Partial router configuration options
* @returns {void}
*
* @example
* routerDefineOptions({
* prefix: '/app',
* target: '#content',
* onError: (err) => showErrorToast(err.message)
* });
*/
export declare function routerDefineOptions(options: Partial<TRouterOptions>): void;