mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
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:
Vendored
+1
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user