@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.
16 lines (15 loc) • 578 B
TypeScript
/**
* Retrieves all URL parameters from the current route
*
* This function extracts both route parameters (defined with :paramName in routes)
* and query string parameters from the current URL.
*
* @returns {Record<string, string | string[]>} An object containing all URL parameters with parameter names as keys
*
* @example
* // For a URL like '/users/123?filter=active'
* // With a route defined as '/users/:id'
* const params = getParams();
* // Result: { id: '123', filter: 'active' }
*/
export declare function getParams(): Record<string, string | string[]>;