-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure equivalent Flow and TypeScript turbo module definition generates the same output #34251
Conversation
Hi @ZihanChen-MSFT, thanks for the Pr. Could you update the Changelog section, please? If I'm not mistaken, it is taken automatically and it would be nicer to have an informative message for it. Thanks a lot! |
@cipolleschi I took care of the changelog entry :) |
@dmitryrykun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@dmitryrykun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This pull request was successfully merged by @ZihanChen-MSFT in 0ce4ea2. When will my fix make it into a release? | Upcoming Releases |
…es the same output (facebook#34251) Summary: Flow and TypeScript are two very similar programming languages. They are both recognizable as inputs for turbo module codegen. It is reasonable to require equivalent Flow and TypeScript turbo module definition generates the same output. I add some test cases to ensure this. Glad that no functional inconsistency is found here. ## Changelog [General] [Changed] - codegen: ensure equivalent Flow and TypeScript TM definition generates the same output Pull Request resolved: facebook#34251 Test Plan: `yarn jest` passed in `packages/react-native-codegen` Reviewed By: dmitryrykun Differential Revision: D38116756 Pulled By: cipolleschi fbshipit-source-id: 476adbd171a35813923f2020c826d21b1fc2eeed
…es the same output (facebook#34251) Summary: Flow and TypeScript are two very similar programming languages. They are both recognizable as inputs for turbo module codegen. It is reasonable to require equivalent Flow and TypeScript turbo module definition generates the same output. I add some test cases to ensure this. Glad that no functional inconsistency is found here. ## Changelog [General] [Changed] - codegen: ensure equivalent Flow and TypeScript TM definition generates the same output Pull Request resolved: facebook#34251 Test Plan: `yarn jest` passed in `packages/react-native-codegen` Reviewed By: dmitryrykun Differential Revision: D38116756 Pulled By: cipolleschi fbshipit-source-id: 476adbd171a35813923f2020c826d21b1fc2eeed
…es the same output (#34620) 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 Pull Request resolved: #34620 Test Plan: `yarn jest` passed in `packages/react-native-codegen` Reviewed By: NickGerleman Differential Revision: D39321965 Pulled By: cipolleschi fbshipit-source-id: aec60f5c9c18323cbd833bf5705af544d7db2e73
…es the same output (#34251) Summary: Flow and TypeScript are two very similar programming languages. They are both recognizable as inputs for turbo module codegen. It is reasonable to require equivalent Flow and TypeScript turbo module definition generates the same output. I add some test cases to ensure this. Glad that no functional inconsistency is found here. ## Changelog [General] [Changed] - codegen: ensure equivalent Flow and TypeScript TM definition generates the same output Pull Request resolved: #34251 Test Plan: `yarn jest` passed in `packages/react-native-codegen` Reviewed By: dmitryrykun Differential Revision: D38116756 Pulled By: cipolleschi fbshipit-source-id: 476adbd171a35813923f2020c826d21b1fc2eeed
…es the same output (facebook#34620) Summary: Pull request facebook#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 Pull Request resolved: facebook#34620 Test Plan: `yarn jest` passed in `packages/react-native-codegen` Reviewed By: NickGerleman Differential Revision: D39321965 Pulled By: cipolleschi fbshipit-source-id: aec60f5c9c18323cbd833bf5705af544d7db2e73
Summary
Flow and TypeScript are two very similar programming languages. They are both recognizable as inputs for turbo module codegen. It is reasonable to require equivalent Flow and TypeScript turbo module definition generates the same output.
I add some test cases to ensure this. Glad that no functional inconsistency is found here.
Changelog
[General] [Changed] - codegen: ensure equivalent Flow and TypeScript TM definition generates the same output
Test Plan
yarn jest
passed inpackages/react-native-codegen