export default class WebSocket { static OPEN: number; static CONNECTING: number; static CLOSING: number; static CLOSED: number; private socket; private listeners; constructor(url: string | URL, options?: string | string[] | { headers?: Record; [key: string]: any; }); get readyState(): 0 | 2 | 1 | 3; send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void; close(code?: number, reason?: string): void; on(event: string, listener: (...args: any[]) => void): this; once(event: string, listener: (...args: any[]) => void): this; off(event: string, listener: (...args: any[]) => void): this; removeAllListeners(event?: string): this; private emit; }