export interface EventBus { emit(channel: string, data: unknown): void; on(channel: string, handler: (data: unknown) => void): () => void; } export interface EventBusController extends EventBus { clear(): void; } export declare function createEventBus(): EventBusController; export interface PreparedEventBusCommit { commit(): void; rollback(): void; } export interface StagedEventBus { readonly bus: EventBus; prepareCommit(): PreparedEventBusCommit; commit(): void; } /** Isolate reload-candidate events from the live bus until publication. */ export declare function createStagedEventBus(target: EventBus): StagedEventBus; /** * Register `facade` as forwarding to `bus`, so `canonicalEventBusFor(facade)` * resolves to `bus`. */ export declare function registerCanonicalEventBus(facade: object, bus: object): void; /** * Resolve a scope object to the canonical EventBus it forwards to. A * registered per-extension `events` facade yields the shared bus behind it; * anything else — including a canonical bus itself — is returned unchanged, * so canonical buses are fixed points. */ export declare function canonicalEventBusFor(scope: object): object; //# sourceMappingURL=event-bus.d.ts.map