1 | /**
|
2 | * This class represents a basic channel.
|
3 | */
|
4 | export declare abstract class Channel {
|
5 | /**
|
6 | * The Echo options.
|
7 | */
|
8 | options: any;
|
9 | /**
|
10 | * Listen for an event on the channel instance.
|
11 | */
|
12 | abstract listen(event: string, callback: Function): this;
|
13 | /**
|
14 | * Listen for a whisper event on the channel instance.
|
15 | */
|
16 | listenForWhisper(event: string, callback: Function): this;
|
17 | /**
|
18 | * Listen for an event on the channel instance.
|
19 | */
|
20 | notification(callback: Function): this;
|
21 | /**
|
22 | * Stop listening to an event on the channel instance.
|
23 | */
|
24 | abstract stopListening(event: string, callback?: Function): this;
|
25 | /**
|
26 | * Stop listening for a whisper event on the channel instance.
|
27 | */
|
28 | stopListeningForWhisper(event: string, callback?: Function): this;
|
29 | /**
|
30 | * Register a callback to be called anytime a subscription succeeds.
|
31 | */
|
32 | abstract subscribed(callback: Function): this;
|
33 | /**
|
34 | * Register a callback to be called anytime an error occurs.
|
35 | */
|
36 | abstract error(callback: Function): this;
|
37 | }
|