import { ClientOptions } from 'ws';
export interface WebSocket {
    close(code?: number, reason?: string): void;
    send(data: string | ArrayBuffer | Blob): void;
    onopen: (event: any) => void;
    onclose: (event: any) => void;
    onmessage: (event: any) => void;
    onerror: (event: any) => void;
    /**
     * @description
     * It gets called when some backpressure
     * has drained from the write buffer.
     * @param backpressure
     */
    ondrain?: (backpressure: number) => void;
    binaryType: 'arraybuffer' | 'blob';
    bufferedAmount: number;
    readyState: number;
}
export declare let createWebSocket: (url: string, protocol: string | string[], options?: ClientOptions) => WebSocket;
