import { Observable, Subscription, PartialObserver } from 'rxjs'; import { Type } from '../di'; import { BusEvent } from './BusEvent'; /** * Custom eventing bus that abstracts common patterns between events. * @export * @class EventBus */ export declare class EventBus { private _bus; private _observable; /** * Subscribes to a specific event type. * @template T The bus event type. * @param {Type} Event * @param {(PartialObserver|((event: T) => void))} observer * @returns {Subscription} */ subscribe>(Event: Type, observer: PartialObserver | ((event: T) => void)): Subscription; /** * Creates an observable scoped to a specific event type. * @template T The bus event type. * @param {Type} Event * @returns {Observable} */ scope>(Event: Type): Observable; /** * Dispatches an event. * @template T The bus event type. * @param {T} event */ next>(event: T): void; }