UNPKG

@edifice.io/client

Version:
10 lines (9 loc) 478 B
import { IHttpErrorEvent, ISubject, ISubjectMessage, ISubscription, LayerName } from './interfaces'; export declare class Subject implements ISubject { private publishChannels; private getChannelName; private getPublishChannel; newChannel(layer: string): BroadcastChannel; publish(layer: LayerName, message: ISubjectMessage | IHttpErrorEvent): void; subscribe<T extends ISubjectMessage>(layer: LayerName, handler: (message: T) => void): ISubscription; }