-
Notifications
You must be signed in to change notification settings - Fork 55
/
whevent.d.ts
109 lines (96 loc) · 3.23 KB
/
whevent.d.ts
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
declare module whevent {
export var debugMode: boolean;
export var logger: function;
export var lastEvent: any;
/**
* Bind a signal with given function
* @param signal Signal
* @param func Function
* @param self This boject
*/
@deprecated
export function bind(signal: string, func: function, self?: any);
/**
* Bind a signal with given function
* @param signal Signal
* @param func Function
* @param self This boject
*/
export function on(signal: string, func: function, self?: any);
/**
* Bind a signal with given function, once the signal is broadcasted, that function always get called first.
* @param signal Signal
* @param func Function
* @param self This boject
*/
@deprecated
export function bindPriority(signal: string, func: function, self?: any);
/**
* Bind a signal with given function, once the signal is broadcasted, that function always get called first.
* @param signal Signal
* @param func Function
* @param self This boject
*/
export function onPriority(signal: string, func: function, self?: any);
/**
* Bind a signal with given function, once the signal is broadcasted, the binding between this signal and this function will be destroyed.
* @param signal Signal
* @param func Function
* @param self This boject
*/
@deprecated
export function bindOnce(signal: string, func: function, self?: any);
/**
* Bind a signal with given function, once the signal is broadcasted, the binding between this signal and this function will be destroyed.
* @param signal Signal
* @param func Function
* @param self This boject
*/
export function onOnce(signal: string, func: function, self?: any);
/**
* Bind a signal with given function, once the signal is broadcasted, that function always get called first, after that the binding between this signal and this function will be destroyed.
* @param signal Signal
* @param func Function
* @param self This boject
*/
@deprecated
export function bindOncePriority(signal: string, func: function, self?: any);
/**
* Bind a signal with given function, once the signal is broadcasted, that function always get called first, after that the binding between this signal and this function will be destroyed.
* @param signal Signal
* @param func Function
* @param self This boject
*/
export function onOncePriority(signal: string, func: function, self?: any);
/**
* Destroy the binding between given signal and function.
* @param signal Signal
* @param func Function
* @param self This boject
*/
@deprecated
export function unbind(signal: string, func: function, self?: any);
/**
* Destroy the binding between given signal and function.
* @param signal Signal
* @param func Function
* @param self This boject
*/
export function off(signal: string, func: function, self?: any);
/**
* Destroy a signal, all bindings with this signal will be destroyed.
* @param signal Signal
*/
export function destroy(signal: string);
/**
* Broadcast a signal, triggers all binded functions.
* @param signal Signal
*/
@deprecated
export function call(signal: string, data?: any);
/**
* Broadcast a signal, triggers all binded functions.
* @param signal Signal
*/
export function emit(signal: string, data?: any);
}