import { RemoteEvents } from '../RemoteSuite';
import Task from '@dojo/core/async/Task';
export default abstract class BaseChannel {
    readonly url: string;
    readonly sessionId: string;
    constructor(options: ChannelOptions);
    /**
     * Send a message, or schedule it to be sent. Return a promise that resolves when the message has been sent.
     */
    sendMessage(name: keyof RemoteEvents, data: any): Task<void>;
    protected abstract _sendData(name: keyof RemoteEvents, data: any): Task<void>;
}
export interface ChannelOptions {
    sessionId: string;
    /** An HTTP URL that the testing host can be reached at */
    url: string;
    /** A websocket port */
    port?: number;
    /** A timeout for websocket responses */
    timeout?: number;
}
export declare function isChannel(value: any): value is BaseChannel;
export interface ChannelOptions {
    sessionId: string;
    url: string;
    /** A WebSocket port */
    port?: number;
    /** A timeout for WebSocket responses */
    timeout?: number;
}
export interface Message {
    sessionId: string;
    id: string;
    name: string;
    data: any;
}
