From a97fdbad6911b384e08fd6bc98e4f8d8c2ee8fa5 Mon Sep 17 00:00:00 2001 From: Janne Ramstedt Date: Sat, 9 Feb 2019 03:46:18 +0200 Subject: [PATCH] Context is optional, uses "this" as fallback. --- types/p2/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/p2/index.d.ts b/types/p2/index.d.ts index 95082f836d..7a3715c7c7 100644 --- a/types/p2/index.d.ts +++ b/types/p2/index.d.ts @@ -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;