/** * Safe custom element registration utility * * Prevents "NotSupportedError: the name X has already been used with this registry" * by checking if an element is already registered before defining it. * * Usage: * ```typescript * import { safeDefineElement } from './utils/safe-element-registry'; * * // Instead of: customElements.define('my-element', MyElement); * safeDefineElement('my-element', MyElement); * ``` */ /** * Safely define a custom element, checking if it's already registered * @param tagName - The custom element tag name (must include a hyphen) * @param elementClass - The custom element class (extends HTMLElement) * @returns The element class (whether newly registered or already existing) */ export declare function safeDefineElement(tagName: string, elementClass: CustomElementConstructor): CustomElementConstructor; /** * Check if a custom element is already registered * @param tagName - The custom element tag name * @returns true if registered, false otherwise */ export declare function isElementDefined(tagName: string): boolean;