[Codegen] Wrap the content of the case Array and case $ReadOnlyArray in Flow into a separate function#34948
Closed
MaeIg wants to merge 2 commits into
Closed
Conversation
Contributor
Author
|
Note: No new test because |
Base commit: 14456e7 |
Base commit: b33961d |
cipolleschi
approved these changes
Oct 12, 2022
Contributor
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Collaborator
|
This pull request was successfully merged by @MaeIg in c388e6c. When will my fix make it into a release? | Upcoming Releases |
mohitcharkha
pushed a commit
to mohitcharkha/react-native
that referenced
this pull request
Oct 17, 2022
…to a separate function (facebook#34948) Summary: This PR aims to extract translateArrayTypeAnnotation logic into a separate function as it is done in typescript folder. This will enable us to extract translateArrayTypeAnnotation function into a shared folder in a later step. It is a task of facebook#34872: > Wrap the content of the case Array: and case ReadOnlyArray in [Flow](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/flow/modules/index.js#L106-L107) into a separate function, as it is for the [TypeScript](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/typescript/modules/index.js#L218-L234) parser. This will enable us to unify the two parsers in a later step. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Internal] [Changed] - Wrap the content of the case Array and case $ReadOnlyArray in Flow into a separate function Pull Request resolved: facebook#34948 Test Plan: yarn flow: <img width="645" alt="image" src="https://user-images.githubusercontent.com/40902940/195200715-7f60d927-e262-4a94-ad91-a884d37726b8.png"> yarn lint: <img width="502" alt="image" src="https://user-images.githubusercontent.com/40902940/195200799-7959e068-b5b7-4242-a7b1-7afd80866d7f.png"> yarn jest react-native-codegen: <img width="381" alt="image" src="https://user-images.githubusercontent.com/40902940/195200775-76957c19-d06d-431c-8555-889a4205374e.png"> Reviewed By: dmytrorykun Differential Revision: D40296730 Pulled By: cipolleschi fbshipit-source-id: ad2d965046e25ee000ae6e07075976e5a0c78f1a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR aims to extract translateArrayTypeAnnotation logic into a separate function as it is done in typescript folder. This will enable us to extract translateArrayTypeAnnotation function into a shared folder in a later step. It is a task of #34872:
Changelog
[Internal] [Changed] - Wrap the content of the case Array and case $ReadOnlyArray in Flow into a separate function
Test Plan
yarn flow:

yarn lint:

yarn jest react-native-codegen:
