UNPKG

646 BTypeScriptView Raw
1import { Channel } from './channel';
2/**
3 * This interface represents a presence channel.
4 */
5export interface PresenceChannel extends Channel {
6 /**
7 * Register a callback to be called anytime the member list changes.
8 */
9 here(callback: Function): PresenceChannel;
10 /**
11 * Listen for someone joining the channel.
12 */
13 joining(callback: Function): PresenceChannel;
14 /**
15 * Send a whisper event to other clients in the channel.
16 */
17 whisper(eventName: string, data: any): PresenceChannel;
18 /**
19 * Listen for someone leaving the channel.
20 */
21 leaving(callback: Function): PresenceChannel;
22}