mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-25 12:00:38 +08:00
Updated events module to include exported EventEmitter CLASS so it can be extended, like in the Azure library.
This commit is contained in:
1 parent
4306205fa5
commit
9c35a42514
2 files changed
+74
-5
No files matched your search
Vendored
+10
-1
@@ -225,7 +225,16 @@ declare module "events" {
|
||||
emit(event: string, arg1?: any, arg2?: any): void;
|
||||
}
|
||||
|
||||
export var EventEmitter: NodeEventEmitter;
|
||||
export class EventEmitter implements NodeEventEmitter {
|
||||
addListener(event: string, listener: Function);
|
||||
on(event: string, listener: Function): any;
|
||||
once(event: string, listener: Function): void;
|
||||
removeListener(event: string, listener: Function): void;
|
||||
removeAllListener(event: string): void;
|
||||
setMaxListeners(n: number): void;
|
||||
listeners(event: string): { Function; }[];
|
||||
emit(event: string, arg1?: any, arg2?: any): void;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "http" {
|
||||
|
||||
Reference in new issue
Block a user