import { CancellablePromise } from '@theintern/common'; import { RemoteEvents } from '../RemoteSuite'; import BaseChannel, { ChannelOptions } from './Base'; export default class HttpChannel extends BaseChannel { protected _lastRequest: CancellablePromise; protected _messageBuffer: MessageEntry[]; protected _sequence: number; protected _maxPostSize: number; protected _activeRequest: CancellablePromise | undefined; constructor(options: HttpChannelOptions); protected _sendData(name: keyof RemoteEvents, data: any): CancellablePromise; protected _sendMessages(): CancellablePromise | undefined; } export interface HttpChannelOptions extends ChannelOptions { maxPostSize?: number; } export interface MessageEntry { message: string; resolve: (value: any) => void; reject: (error: Error) => void; }