Skip to content

Commit 0627cd6

Browse files
youeddfacebook-github-bot
authored andcommitted
Refactor translate UniontypeAnnotation (#35050)
Summary: Part of #34872 > [Assigned to youedd] This task is more advanced than the others Create a function to unify the [unionType](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/flow/modules/index.js#L372-L396) and the [TSUnionType](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/typescript/modules/index.js#L407-L431). This task may share some logic from the previous task. The function should accept a ParserType parameter to implement the proper logic to extract the memberType variable. Ideally, we should create a couple of supporting functions to implement those logics. ## 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] - Refactor translate UniontypeAnnotation Pull Request resolved: #35050 Test Plan: `yarn jest react-native-codegen` ![image](https://user-images.githubusercontent.com/19575877/197334084-2daeed7e-8e87-4140-b8c3-07f2de3f0496.png) Reviewed By: cortinico Differential Revision: D40637299 Pulled By: cipolleschi fbshipit-source-id: 1490001a3398c3af79d465c40de3c3687f058523
1 parent cba56ea commit 0627cd6

File tree

5 files changed

+509
-50
lines changed

5 files changed

+509
-50
lines changed

0 commit comments

Comments
 (0)