/** * Publishes committed runtime events while isolating listener failures. * * @module */ import { type Disposable, type MaybePromise } from './disposable.js'; import { type PluginErrorSink, type PluginWarningSink } from './reporting.js'; export type PluginEventMap = Record; export type CommittedEventListener = (payload: TPayload) => MaybePromise; export interface CommittedEventBusOptions { readonly warningSink?: PluginWarningSink; readonly errorSink?: PluginErrorSink; readonly listenerTimeoutMs?: number; } export declare const DEFAULT_COMMITTED_EVENT_LISTENER_TIMEOUT_MS = 5000; export declare class CommittedEventBus implements Disposable { private readonly options; private readonly listeners; private readonly emissionTails; private readonly listenerTimeoutMs; private disposed; constructor(options?: CommittedEventBusOptions); on(eventName: TKey, listener: CommittedEventListener): Disposable; emitCommitted(eventName: TKey, payload: TEvents[TKey]): Promise; private dispatch; private invokeListener; listenerCount(eventName?: keyof TEvents & string): number; dispose(): void; private assertActive; private assertEventName; }