import { CancellablePromise } from '@theintern/common'; import BaseChannel, { ChannelOptions } from './Base'; export default class WebSocketChannel extends BaseChannel { timeout: number; protected _socket: WebSocket; protected _sendQueue: { [key: string]: { resolve: (value: any) => void; reject: (error: Error) => void; } | undefined; }; protected _ready: CancellablePromise; protected _sequence: number; constructor(options: ChannelOptions); protected _sendData(name: string, data: any): CancellablePromise; protected _handleMessage(message: any): void; protected _handleError(error: Error): void; }