From 8f7784afa1e086ecae2f5de3bb78e550e34f7216 Mon Sep 17 00:00:00 2001 From: cailenmusselman Date: Fri, 24 Mar 2017 09:08:26 -0600 Subject: [PATCH] Context passed to EventEmitter.addListener() should be optional. (#15353) As suggested in the already existing comments above the declaration. And as specified in the react-native source: https://github.com/facebook/react-native/blob/master/Libraries/EventEmitter/EventEmitter.js#L60-L64 --- react-native/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-native/index.d.ts b/react-native/index.d.ts index 11d0c4478b..c06d5b67b4 100644 --- a/react-native/index.d.ts +++ b/react-native/index.d.ts @@ -149,7 +149,7 @@ interface EventEmitterListener { * @param {*} context - Optional context object to use when invoking the * listener */ - addListener(eventType: string, listener: (...args: any[]) => any, context: any): EmitterSubscription + addListener(eventType: string, listener: (...args: any[]) => any, context?: any): EmitterSubscription } interface EventEmitter extends EventEmitterListener {