mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
ae1d54bc5a
Summary: Refering to "Support function signature along with function type properties in commands" in https://github.com/facebook/react-native/issues/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: https://github.com/facebook/react-native/pull/35311 Test Plan: `yarn jest react-native-codegen` passed Reviewed By: rshest Differential Revision: D41217482 Pulled By: cipolleschi fbshipit-source-id: 480af118d09b022bae919c5391547fd82c1a7cc9
react-native-codegen
Installation
yarn add --dev react-native-codegen
Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like
Testing
To run the tests in this package, run the following commands from the react Native root folder:
yarnto install the dependencies. You just need to run this onceyarn jest react-native-codegen.