UNPKG

@salad-labs/loopz-typescript

Version:
28 lines 1.04 kB
import { Maybe } from "./types"; import { NotificationMessage } from "./types/notification"; export declare class Notification { private static _config; private static _instance; private static _client; private _socket; private _socketInitialized; private _onOpenConnectionFunctions; private _onCloseConnectionFunctions; private _onMessageFunctions; private constructor(); /** static methods */ static config(config: { devMode: boolean; }): void; static getInstance(): Notification; /** public instance methods */ init(): void; close(): void; onOpenConnection(callback: (this: WebSocket, ev: Event) => any): Maybe<string>; onCloseConnection(callback: (this: WebSocket, ev: CloseEvent) => any): string | undefined; onMessage(callback: (message: NotificationMessage) => any): string | undefined; offOpenConnection(key: string): void; offCloseConnection(key: string): void; offMessage(key: string): void; } //# sourceMappingURL=notification.d.ts.map