import type DomainMessage from "../../Domain/Event/DomainMessage"; import type EventListener from "./EventListener"; import type EventSubscriber from "./EventSubscriber"; import type IEventBus from "./IEventBus"; import type { DomainEventConstructor } from "./IEventBus"; export default class EventBus implements IEventBus { private readonly subscribersRegistry; private readonly listenersRegistry; publish(message: DomainMessage): Promise; attach(event: DomainEventConstructor, subscriber: EventSubscriber): EventBus; addListener(listener: EventListener): EventBus; private subscribersFor; }