@edifice.io/client
Version:
11 lines (10 loc) • 510 B
TypeScript
import { ISubject, ISubjectMessage, ISubscription, LayerName } from './interfaces';
import { SimpleChannel } from './SimpleChannel';
export declare class Subject<T extends ISubjectMessage> implements ISubject<T> {
private publishChannels;
private getChannelName;
private getPublishChannel;
newChannel(layer: string): SimpleChannel<any>;
publish(layer: LayerName, message: T): void;
subscribe<T extends ISubjectMessage>(layer: LayerName, handler: (message: T) => void): ISubscription;
}