Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Codegen 112] - Extract the content into handleEventHandler #38805

Conversation

kyawthura-gg
Copy link
Contributor

Summary:

Part of #34872

Extract the content of the if branches that handle the EventHandlers (Flow, TypeScript) into a handleEventHandler function in parsers-commons.js. This will take a name, a typeAnnotation, a parser and a findEventArgumentsAndType function as parameters. Use the switch based approach from TypeScript.

Changelog:

[Internal][Changed]: Extract the content into handleEventHandler

Test Plan:

yarn test react-native-codegen

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Aug 5, 2023
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,892,884 -1
android hermes armeabi-v7a 7,941,609 -3
android hermes x86 9,290,645 +1
android hermes x86_64 9,192,284 -1
android jsc arm64-v8a 9,485,476 +0
android jsc armeabi-v7a 8,427,162 -1
android jsc x86 9,469,399 +1
android jsc x86_64 9,783,778 +3

Base commit: 7709aad
Branch: main

Copy link
Contributor

@cipolleschi cipolleschi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! Thanks for continuing working on this! :D

@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@github-actions
Copy link

github-actions bot commented Aug 7, 2023

This pull request was successfully merged by @kyawthura-gg in ccd191d.

When will my fix make it into a release? | Upcoming Releases

@github-actions github-actions bot added the Merged This PR has been merged. label Aug 7, 2023
@kyawthura-gg kyawthura-gg deleted the refactor/extract-handleEventHandler branch August 7, 2023 10:57
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants