import type { WebSocket as NodeWebSocket } from 'ws'; import { Evt } from 'evt'; export declare class TimeoutError extends Error { } interface ISocketConfig { connectTimeout?: number; sendTimeout?: number; pingTimeout?: number; id?: string; } export default class ISocket { private ws; private connectTimeout; private sendTimeout; private pingTimeout; private isAuthenticated; private timeouts; onMessage: Evt; onOpen: Evt; onError: Evt; onClose: Evt<[number, string]>; onAuthenticated: Evt; id: string; private pendingMessages; /** Client **/ connect(): Promise; /** Server **/ confirmAuthentication(): Promise; /** Both **/ send(data: string): Promise; /** Both **/ close(): void; constructor(ws: WebSocket | NodeWebSocket, config?: ISocketConfig); get isPingSupported(): boolean; /** Both **/ ping(): Promise; } export {};