UNPKG

mx-ui-components

Version:

mobius ui library

26 lines (25 loc) 676 B
import type BaseComponent from "../Counter/BaseComponent"; type ConnectionStr = { serverUrl: string; namespace?: string; }; type Subscribe = { event: string; callback: Function; component: HTMLElement | BaseComponent; }; export declare class WebSocketManager { private static instances; private socket; private subscribers; private url; constructor(connectionStr: ConnectionStr); subscribe(subcriptionDetails: Subscribe): void; unsubscribe({ event, component }: { event: string; component: HTMLElement | BaseComponent; }): void; emit(event: any, ...data: any): void; disconnect(): void; } export {};