Fix interface support in turbo module TypeScript codegen (component only)#34778
Closed
ZihanChen-MSFT wants to merge 12 commits into
Closed
Fix interface support in turbo module TypeScript codegen (component only)#34778ZihanChen-MSFT wants to merge 12 commits into
ZihanChen-MSFT wants to merge 12 commits into
Conversation
Base commit: f85e2ec |
Contributor
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
|
Hi @ZihanChen-MSFT, there are some errors in the CI for some JS files. For example, the Could you have a look and fix these, please? |
Contributor
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
94fb3ab to
0dfa3af
Compare
ZihanChen-MSFT
commented
Sep 26, 2022
0feefe5 to
ea1b680
Compare
cipolleschi
approved these changes
Sep 27, 2022
Contributor
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Base commit: f85e2ec |
Collaborator
|
This pull request was successfully merged by @ZihanChen-MSFT in 8dc6bec. When will my fix make it into a release? | Upcoming Releases |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Interface was supported in component, but it only allows interfaces in limited cases.
In this change, I extended interface support to all places where object literal type is supported.
I also refactor the code so that properties and events are able to share the same implementation.
In order not to mess up the diff, I noticed that implementations are repeated in processing array properties and non-array properties. But I leave it without refactoring. I will do it in future PRs.
I also commented potential problems I found in the code.
Changelog
[General] [Changed] - Fix interface support in turbo module TypeScript codegen (component only)
Test Plan
yarn jest react-native-codegenpassed