-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.d.ts
35 lines (24 loc) · 1.24 KB
/
index.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
// DefinitelyTyped
// Project: https://github.com/piecioshka/super-event-emitter
type Handler = (payload?: any) => void;
declare module "super-event-emitter" {
export class EventEmitter {
on(name: string, handler: Handler, context?: any): EventEmitter;
bind(name: string, handler: Handler, context?: any): EventEmitter;
addListener(name: string, handler: Handler, context?: any): EventEmitter;
addEventListener(name: string, handler: Handler, context?: any): EventEmitter;
once(name: string, handler: Handler, context?: Object): EventEmitter;
off(name?: string, handler?: Handler): EventEmitter;
unbind(name?: string, handler?: Handler): EventEmitter;
removeListener(name?: string, handler?: Handler): EventEmitter;
removeEventListener(name?: string, handler?: Handler): EventEmitter;
emit(name: string, params?: any): EventEmitter;
trigger(name: string, params?: any): EventEmitter;
dispatchListener(name: string, params?: any): EventEmitter;
dispatchEventListener(name: string, params?: any): EventEmitter;
mixin(target: T): T;
static mixin(target: T): T;
static VERSION: string;
}
export default EventEmitter;
}