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
This commit is contained in:
cailenmusselman
2017-03-24 08:08:26 -07:00
committed by Andy
parent 55bf786d3b
commit 8f7784afa1
+1 -1
View File
@@ -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 {