- ✅ 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
64 lines
1.8 KiB
TypeScript
64 lines
1.8 KiB
TypeScript
import IVirtualConsoleLogEntry from './IVirtualConsoleLogEntry.js';
|
|
import VirtualConsoleLogLevelEnum from './enums/VirtualConsoleLogLevelEnum.js';
|
|
import Event from '../event/Event.js';
|
|
import IVirtualConsolePrinter from './IVirtualConsolePrinter.js';
|
|
/**
|
|
* Virtual console printer.
|
|
*/
|
|
export default class VirtualConsolePrinter implements IVirtualConsolePrinter {
|
|
#private;
|
|
/**
|
|
* Returns closed state.
|
|
*
|
|
* @returns True if the printer is closed.
|
|
*/
|
|
get closed(): boolean;
|
|
/**
|
|
* Writes to the output.
|
|
*
|
|
* @param logEntry Log entry.
|
|
*/
|
|
print(logEntry: IVirtualConsoleLogEntry): void;
|
|
/**
|
|
* Clears the output.
|
|
*/
|
|
clear(): void;
|
|
/**
|
|
* Clears and closes the virtual console printer.
|
|
*/
|
|
close(): void;
|
|
/**
|
|
* Adds an event listener.
|
|
*
|
|
* @param eventType Event type ("print" or "clear").
|
|
* @param listener Listener.
|
|
*/
|
|
addEventListener(eventType: 'print' | 'clear', listener: (event: Event) => void): void;
|
|
/**
|
|
* Removes an event listener.
|
|
*
|
|
* @param eventType Event type ("print" or "clear").
|
|
* @param listener Listener.
|
|
*/
|
|
removeEventListener(eventType: 'print' | 'clear', listener: (event: Event) => void): void;
|
|
/**
|
|
* Dispatches an event.
|
|
*
|
|
* @param event Event.
|
|
*/
|
|
dispatchEvent(event: Event): void;
|
|
/**
|
|
* Reads the buffer.
|
|
*
|
|
* @returns Console log entries.
|
|
*/
|
|
read(): IVirtualConsoleLogEntry[];
|
|
/**
|
|
* Returns the buffer as a string.
|
|
*
|
|
* @param [logLevel] Log level.
|
|
* @returns Buffer as a string of concatenated log entries.
|
|
*/
|
|
readAsString(logLevel?: VirtualConsoleLogLevelEnum): string;
|
|
}
|
|
//# sourceMappingURL=VirtualConsolePrinter.d.ts.map
|