import { Observable } from "@tmorin/ceb-messaging-core"; import { IpcEventBusNotificationMap, IpcObservableEventBus } from "./event"; import { IpcCommandBusNotificationMap, IpcObservableCommandBus } from "./command"; import { IpcObservableQueryBus, IpcQueryBusNotificationMap } from "./query"; /** * The observable view of a gateway merges the observable channel of all buses. */ export declare type IpcObservableGateway = IpcObservableCommandBus & IpcObservableEventBus & IpcObservableQueryBus; /** * The map defines the internal events of all buses. */ export declare type IpcGatewayNotificationMap = IpcCommandBusNotificationMap & IpcEventBusNotificationMap & IpcQueryBusNotificationMap; /** * Simple implementation of {@link IpcObservableGateway}. */ export declare class IpcGatewayObserver implements IpcObservableGateway { private readonly events; private readonly commands; private readonly queries; constructor(events: Observable, commands: Observable, queries: Observable); on(type: K, listener: (event: IpcGatewayNotificationMap[K]) => any): this; off(type?: K, listener?: (event: IpcGatewayNotificationMap[K]) => any): this; }