Skip to content

Commit

Permalink
Add annotations and casts to fix future flow error (facebook#48219)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#48219

Changelog: [internal]

Reviewed By: panagosg7

Differential Revision: D67099060

fbshipit-source-id: fbb975d6194b071aa8f30dcd2b8f7f40130d31fb
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Dec 11, 2024
1 parent 3ff9212 commit 7000b9b
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,14 @@ class RNTesterPlatformTestEventRecorder {
callback && callback(event, eventType, targetName),
);
const eventListenerProps = this.relevantEvents.reduce(
(acc, eventName) => {
(acc: ViewProps, eventName) => {
const eventPropName =
'on' + eventName[0].toUpperCase() + eventName.slice(1);
return {
...acc,
// $FlowFixMe[missing-local-annot]
[eventPropName]: e => {
[eventPropName]: (e => {
recordedEventHandler(e, eventName);
},
}) as $FlowFixMe,
};
},
{},
Expand Down

0 comments on commit 7000b9b

Please sign in to comment.