UNPKG

@typescript-eda/application

Version:

Application layer orchestration and dependency injection for TypeScript-EDA event-driven architecture

28 lines 991 B
/** * @fileoverview This file defines the Application class, the base class for all applications. * @author rydnr * @module application/application */ import { Event } from '../domain/event'; /** * Represents the base class for all applications. */ export declare abstract class Application { /** * A map of metadata for the application. * @abstract */ abstract readonly metadata: Map<string, unknown>; /** * Handles one or more events, processing them and any resulting events. * @param {Event | Event[]} events The event or events to handle. * @returns {Promise<void>} A promise that resolves when all events have been handled. */ handle(events: Event | Event[]): Promise<void>; /** * Starts the application, initializing all adapters and primary ports. * @returns {Promise<void>} A promise that resolves when the application has started. */ start(): Promise<void>; } //# sourceMappingURL=application.d.ts.map