This repository was archived by the owner on Oct 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathsocketio.common.d.ts
More file actions
35 lines (30 loc) · 1.35 KB
/
socketio.common.d.ts
File metadata and controls
35 lines (30 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
export interface SocketOptions {
query?: string | Object;
forceWebsockets?: boolean,
android?: any;
ios?: any;
}
export declare abstract class Common {
protected _listeners: any;
readonly connected: boolean;
readonly disconnected: boolean;
abstract connect(): void;
abstract disconnect(): void;
abstract open(): void;
abstract close(): void;
abstract on(event: string, callback: (...payload: Array<any>) => any): this;
abstract once(event: string, callback: (...payload: Array<any>) => any): this;
abstract off(event: string, callback?: Function): this;
abstract emit(event: string, ...payload: Array<any>): this;
abstract addEventListener(event: string, callback: (...payload: Array<any>) => any) : this;
abstract removeListener(event: string, callback?: Function): this;
abstract removeEventListener(event: string, callback?: Function): this;
abstract removeAllListeners(): this;
// abstract listeners(event: string): Function[];
// abstract hasListeners(event: string): boolean;
}
export declare const debugNop: (...args: any[]) => void;
export declare function debugDefault(...args: Array<any>): void;
export declare function debug(...args: Array<any>): void;
export declare function enableDebug(debugFn?: ((...args: Array<any>) => any)): void;
export declare function disableDebug(): void;