- ✅ 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
43 lines
1.2 KiB
JavaScript
43 lines
1.2 KiB
JavaScript
import Event from '../Event.js';
|
|
import * as PropertySymbol from '../../PropertySymbol.js';
|
|
/**
|
|
*
|
|
*/
|
|
export default class CustomEvent extends Event {
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
[PropertySymbol.detail];
|
|
/**
|
|
* Constructor.
|
|
*
|
|
* @param type Event type.
|
|
* @param [eventInit] Event init.
|
|
*/
|
|
constructor(type, eventInit = null) {
|
|
super(type, eventInit);
|
|
this[PropertySymbol.detail] = eventInit?.detail ?? null;
|
|
}
|
|
/**
|
|
* Returns detail.
|
|
*
|
|
* @returns Detail.
|
|
*/
|
|
get detail() {
|
|
return this[PropertySymbol.detail];
|
|
}
|
|
/**
|
|
* Init event.
|
|
*
|
|
* @deprecated
|
|
* @param type Type.
|
|
* @param [bubbles=false] "true" if it bubbles.
|
|
* @param [cancelable=false] "true" if it cancelable.
|
|
* @param [detail=null] Custom event detail.
|
|
*/
|
|
initCustomEvent(type, bubbles = false, cancelable = false, detail = null) {
|
|
this[PropertySymbol.type] = type;
|
|
this[PropertySymbol.bubbles] = bubbles;
|
|
this[PropertySymbol.cancelable] = cancelable;
|
|
this[PropertySymbol.detail] = detail;
|
|
}
|
|
}
|
|
//# sourceMappingURL=CustomEvent.js.map
|