codigo0/node_modules/happy-dom/lib/custom-element/CustomElementRegistry.d.ts
planetazuzu 5d7a6500fe refactor: Fase 1 - Clean Architecture, refactorización modular y eliminación de duplicidades
-  Ticket 1.1: Estructura Clean Architecture en backend
-  Ticket 1.2: Schemas Zod compartidos
-  Ticket 1.3: Refactorización drugs.ts (1362 → 8 archivos modulares)
-  Ticket 1.4: Refactorización procedures.ts (3583 → 6 archivos modulares)
-  Ticket 1.5: Eliminación de duplicidades (~50 líneas)

Cambios principales:
- Creada estructura Clean Architecture en backend/src/
- Schemas Zod compartidos en backend/src/shared/schemas/
- Refactorización modular de drugs y procedures
- Utilidades genéricas en src/utils/ (filter, validation)
- Eliminados scripts obsoletos y documentación antigua
- Corregidos errores: QueryClient, import test-error-handling
- Build verificado y funcionando correctamente
2026-01-25 21:09:47 +01:00

65 lines
2 KiB
TypeScript

import * as PropertySymbol from '../PropertySymbol.js';
import HTMLElement from '../nodes/html-element/HTMLElement.js';
import Node from '../nodes/node/Node.js';
import BrowserWindow from '../window/BrowserWindow.js';
import ICustomElementDefinition from './ICustomElementDefinition.js';
/**
* Custom elements registry.
*/
export default class CustomElementRegistry {
#private;
[PropertySymbol.registry]: Map<string, ICustomElementDefinition>;
[PropertySymbol.classRegistry]: Map<typeof HTMLElement, string>;
[PropertySymbol.callbacks]: Map<string, Array<() => void>>;
[PropertySymbol.destroyed]: boolean;
/**
* Constructor.
*
* @param window Window.
*/
constructor(window: BrowserWindow);
/**
* Defines a custom element class.
*
* @param name Tag name of element.
* @param elementClass Element class.
* @param [options] Options.
* @param [options.extends] Extends tag name.
*/
define(name: string, elementClass: typeof HTMLElement, options?: {
extends?: string;
}): void;
/**
* Returns a defined element class.
*
* @param name Tag name of element.
* @returns HTMLElement Class defined or undefined.
*/
get(name: string): typeof HTMLElement | undefined;
/**
* Upgrades a custom element directly, even before it is connected to its shadow root.
*
* Not implemented yet.
*
* @param _root Root node.
*/
upgrade(_root: Node): void;
/**
* When defined.
*
* @param name Tag name of element.
*/
whenDefined(name: string): Promise<void>;
/**
* Reverse lookup searching for name by given element class.
*
* @param elementClass Class constructor.
* @returns Found tag name or `null`.
*/
getName(elementClass: typeof HTMLElement): string | null;
/**
* Destroys the registry.
*/
[PropertySymbol.destroy](): void;
}
//# sourceMappingURL=CustomElementRegistry.d.ts.map