UNPKG

@lovebowls/leagueelements

Version:

League Elements package for LoveBowls

22 lines 1.13 kB
/** * Safely register a custom element, avoiding duplicate registration errors * in single-page applications where modules may be loaded multiple times. * * @param {string} tagName - The custom element tag name (e.g., 'league-element') * @param {CustomElementConstructor} elementClass - The element class constructor * @param {boolean} [logRegistration=false] - Whether to log successful registrations */ export function safeDefine(tagName: string, elementClass: CustomElementConstructor, logRegistration?: boolean): void; /** * Check if a custom element is already registered * @param {string} tagName - The custom element tag name * @returns {boolean} True if the element is already registered */ export function isRegistered(tagName: string): boolean; /** * Get the constructor for a registered custom element * @param {string} tagName - The custom element tag name * @returns {CustomElementConstructor|undefined} The element constructor or undefined if not registered */ export function getElementConstructor(tagName: string): CustomElementConstructor | undefined; //# sourceMappingURL=elementRegistry.d.ts.map