Files
react-native/packages/react-native-codegen/src
Zihan Chen (MSFT) ae1d54bc5a Add TSMethodSignature to react-native-codegen (#35311)
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
2022-11-14 08:01:20 -08:00
..