Skip to content

Ensure equivalent Flow and TypeScript turbo module definition generates the same output - #34620

Closed
ZihanChen-MSFT wants to merge 2 commits into
react:mainfrom
ZihanChen-MSFT:ts-rncodegen6
Closed

Ensure equivalent Flow and TypeScript turbo module definition generates the same output#34620
ZihanChen-MSFT wants to merge 2 commits into
react:mainfrom
ZihanChen-MSFT:ts-rncodegen6

Conversation

@ZihanChen-MSFT

Copy link
Copy Markdown
Contributor

Summary

Pull request #34251 only partially worked because I didn't notice that there is 1 after the snapshot name. In this change I fixed the issue and find out there is one case that Flow and TypeScript parser generate different result.

It is expected since the test inputs are different. TypeScript removes one member because there is no {...X, ...} type in TypeScript. We could make the codegen support intersection type and rewrite it to X & {...}, but this will not be included here anyway.

Changelog

[General] [Changed] - codegen: ensure equivalent Flow and TypeScript TM definition generates the same output

Test Plan

yarn jest passed in packages/react-native-codegen

@facebook-github-botfacebook-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 Sep 7, 2022
@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.

@analysis-bot

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
androidhermesarm64-v8a7,637,462-773
androidhermesarmeabi-v7a7,049,634-869
androidhermesx867,939,086-746
androidhermesx86_647,911,078-761
androidjscarm64-v8a9,513,148+912
androidjscarmeabi-v7a8,288,664+808
androidjscx869,452,528+961
androidjscx86_6410,043,683+1,052

Base commit: 62f83a9
Branch: main

@analysis-bot

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
ios-universaln/a--

Base commit: 62f83a9
Branch: main

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @ZihanChen-MSFT in 737ce36.

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

@react-native-botreact-native-bot added the Merged This PR has been merged. label Sep 9, 2022
@ZihanChen-MSFT
ZihanChen-MSFT deleted the ts-rncodegen6 branch September 9, 2022 21:44
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.MergedThis PR has been merged.Shared with MetaApplied 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.

5 participants

@ZihanChen-MSFT@facebook-github-bot@analysis-bot@react-native-bot@cipolleschi