-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle (T) and undefined properly in turbo module component codegen (#…
…34693) Summary: In `buildEventSchema` and `buildPropSchema`, they check into property types to see if the given property could be converted into an event schema or a property schema. The original implementation only handles limited cases, I refactor them and make them easier to maintain. In `getPropertyType` in `events.js`, it handles `(T)` at a wrong place, fixed. In `getPropertyType` in `props.js`, it doesn't handle `(T)`, fixed. And I also fixed some other issues to make the codegen reports error better. There are many duplicated test cases that cover every piece of the code, I changed some of them so that it tests both original cases and new cases. ## Changelog [General] [Changed] - Handle (T) and undefined properly in turbo module component codegen Pull Request resolved: #34693 Test Plan: `yarn jest` passed in `packages/react-native-codegen` Reviewed By: NickGerleman Differential Revision: D39647075 Pulled By: cipolleschi fbshipit-source-id: 8e1df2b54aab37b7151d0bf74260e2eba0602777
- Loading branch information
1 parent
10e47b8
commit 205cc9b
Showing
4 changed files
with
141 additions
and
102 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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