-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Add TSMethodSignature
to react-native-codegen
#35311
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I like it. The code read well and it is easy to follow. Thank you for this change.
Just a double check here, flow/modules
already support both types of method definitions, right?
Would you mind update one test in the flow/module to keep that checked? The same change for getArray
should be enough!
Base commit: 29caed2 |
@cipolleschi Thanks for the comment! I updated test cases for Flow too but it seems the code covers it perfectly! |
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Base commit: 29caed2 |
PR build artifact for b6fdd84 is ready. |
Summary: Refering to "Support function signature along with function type properties in commands" in facebook#34872 Many TypeScript programmers prefer `{ name(arg:string):void; }` to `{ readonly name:(arg:string)=>void; }`. In this pull request, I updated test cases in both commands and modules to cover it, with missing implementation. Command arguments are `NamedShape<T>` but the `optional` field is missing, it is also fixed. ## Changelog [General] [Changed] - Add `TSMethodSignature` to react-native-codegen Pull Request resolved: facebook#35311 Test Plan: `yarn jest react-native-codegen` passed Reviewed By: rshest Differential Revision: D41217482 Pulled By: cipolleschi fbshipit-source-id: 480af118d09b022bae919c5391547fd82c1a7cc9
Summary
Refering to "Support function signature along with function type properties in commands" in #34872
Many TypeScript programmers prefer
{ name(arg:string):void; }
to{ readonly name:(arg:string)=>void; }
.In this pull request, I updated test cases in both commands and modules to cover it, with missing implementation.
Command arguments are
NamedShape<T>
but theoptional
field is missing, it is also fixed.Changelog
[General] [Changed] - Add
TSMethodSignature
to react-native-codegenTest Plan
yarn jest react-native-codegen
passed