@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.
14 lines (13 loc) • 789 B
TypeScript
import type { TRoute, TRouteInstance } from "../types";
/**
* Processes and registers route definitions for the router
*
* This function transforms the user-provided route definitions into internal route instances
* that the router can work with. It handles nested routes, layouts, and target resolution.
*
* @param {Array<TRoute>} inputRoutes - Array of route configurations to register
* @param {HTMLElement|string} [target] - Default rendering target for routes that don't specify their own
* @param {string} [prefix=''] - Path prefix to prepend to all routes in this set
* @returns {Array<TRouteInstance>} Array of processed route instances
*/
export declare function Routes(inputRoutes: Array<TRoute>, target?: HTMLElement | string, prefix?: string): Array<TRouteInstance>;