1 | import { CancellablePromise } from '@theintern/common';
|
2 | import { RemoteEvents } from '../RemoteSuite';
|
3 | export default abstract class BaseChannel {
|
4 | readonly url: string;
|
5 | readonly sessionId: string;
|
6 | constructor(options: ChannelOptions);
|
7 | sendMessage(name: keyof RemoteEvents, data: any): CancellablePromise<any>;
|
8 | protected abstract _sendData(name: keyof RemoteEvents, data: any): CancellablePromise<any>;
|
9 | }
|
10 | export interface ChannelOptions {
|
11 | sessionId: string;
|
12 | url: string;
|
13 | port?: number;
|
14 | timeout?: number;
|
15 | }
|
16 | export declare function isChannel(value: any): value is BaseChannel;
|
17 | export interface ChannelOptions {
|
18 | sessionId: string;
|
19 | url: string;
|
20 | port?: number;
|
21 | timeout?: number;
|
22 | }
|
23 | export interface Message {
|
24 | sessionId: string;
|
25 | id: string;
|
26 | name: string;
|
27 | data: any;
|
28 | }
|