-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract TypeAlias logic of translateTypeAnnotation from the flow and …
…typescript folders in parsers-primitives (#34918) Summary: This PR aims to reduce code duplication by extracting `typeAliasResolution` logic from the flow and typescript folders into a shared parsers-primitives file. It is a task of #34872: > Wrap the TypeAlias resolution lines ([Flow](https://github.com/facebook/react-native/blob/b444f0e44e0d8670139acea5f14c2de32c5e2ddc/packages/react-native-codegen/src/parsers/flow/modules/index.js#L321-L362), [TypeScript](https://github.com/facebook/react-native/blob/00b795642a6562fb52d6df12e367b84674994623/packages/react-native-codegen/src/parsers/typescript/modules/index.js#L356-L397)) in a proper typeAliasResolution function in the parsers-primitives.js files and replace those lines with the new function. ## 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] - Extract TypeAlias logic of translateTypeAnnotation from the flow and typescript folders in parsers-primitives Pull Request resolved: #34918 Test Plan: All tests are passing, with `yarn jest react-native-codegen`: <img width="930" alt="image" src="https://user-images.githubusercontent.com/40902940/194835192-49478b1c-3e04-40f9-b6f3-e26491f272ab.png"> Reviewed By: rshest Differential Revision: D40223495 Pulled By: rshest fbshipit-source-id: c74b68385e59497b6a8eaa56b96a001ef447a2cd
- Loading branch information
1 parent
9255eea
commit 1fc27c4
Showing
7 changed files
with
186 additions
and
105 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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