Skip to content

[Codegen]: Refactor translate UniontypeAnnotation#35050

Closed
youedd wants to merge 1 commit into
facebook:mainfrom
youedd:chore/refactor-union-type-annotation
Closed

[Codegen]: Refactor translate UniontypeAnnotation#35050
youedd wants to merge 1 commit into
facebook:mainfrom
youedd:chore/refactor-union-type-annotation

Conversation

@youedd
Copy link
Copy Markdown
Contributor

@youedd youedd commented Oct 22, 2022

Summary

Part of #34872

[Assigned to @youedd] This task is more advanced than the others Create a function to unify the unionType and the TSUnionType. 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

[Internal] [Changed] - Refactor translate UniontypeAnnotation

Test Plan

yarn jest react-native-codegen
image

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 22, 2022
@analysis-bot
Copy link
Copy Markdown

analysis-bot commented Oct 22, 2022

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,755,804 +691,008
android hermes armeabi-v7a 7,159,876 +691,001
android hermes x86 8,067,410 +691,018
android hermes x86_64 8,038,084 +691,024
android jsc arm64-v8a 9,614,020 +690,932
android jsc armeabi-v7a 8,379,963 +690,934
android jsc x86 9,560,826 +690,942
android jsc x86_64 10,153,749 +690,943

Base commit: c638822
Branch: main

@youedd youedd force-pushed the chore/refactor-union-type-annotation branch from 516b839 to c801454 Compare October 22, 2022 10:57
@analysis-bot
Copy link
Copy Markdown

analysis-bot commented Oct 22, 2022

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: c638822
Branch: main

@pull-bot
Copy link
Copy Markdown

PR build artifact for c80145462808486c2c03228951cd7e9b91ce260f is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@pull-bot
Copy link
Copy Markdown

PR build artifact for c80145462808486c2c03228951cd7e9b91ce260f is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

Copy link
Copy Markdown
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.

Thanks for doing this! I left a small comment to improve readability of the codebase.

Comment thread packages/react-native-codegen/src/parsers/parsers-commons.js Outdated
@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@youedd youedd force-pushed the chore/refactor-union-type-annotation branch from 11d9794 to aecec14 Compare October 24, 2022 16:46
@pull-bot
Copy link
Copy Markdown

PR build artifact for aecec14dad9e909510437aaf8d77e254706992d3 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@pull-bot
Copy link
Copy Markdown

PR build artifact for aecec14dad9e909510437aaf8d77e254706992d3 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@youedd youedd force-pushed the chore/refactor-union-type-annotation branch from aecec14 to bc1051d Compare October 24, 2022 18:58
@pull-bot
Copy link
Copy Markdown

PR build artifact for bc1051d is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@pull-bot
Copy link
Copy Markdown

PR build artifact for bc1051d is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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. hacktoberfest-accepted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants