Context is optional, uses "this" as fallback.

This commit is contained in:
Janne Ramstedt
2019-02-09 03:46:18 +02:00
parent 30b1546c31
commit a97fdbad69
+1 -1
View File
@@ -431,7 +431,7 @@ declare namespace p2 {
export class EventEmitter {
on(type: string, listener: Function, context: any): EventEmitter;
on(type: string, listener: Function, context?: any): EventEmitter;
has(type: string, listener: Function): boolean;
off(type: string, listener: Function): EventEmitter;
emit(event: any): EventEmitter;