react-native-macos/packages/react-native-codegen
Zihan Chen (MSFT) 624bdc7ec6 Support TypeScript type `(T)` for turbo module codegen (module only) (#34621)
Summary:
1. In some situation (I don't know exactly how it is triggered but I found that during porting it to `react-native-windows`), `ExportNamedDeclaration.exportKind` is missing. Just skip the checking to `exportKind` because the rest of the checking is sufficient without reading this field.
2. Add `TSParenthesizedType` to module codegen in TypeScript, so that type `(T)` is treated like `T`.

## Changelog

[General] [Changed] - codegen: support TypeScript type `(T)` for turbo module codegen (module only)

Pull Request resolved: https://github.com/facebook/react-native/pull/34621

Test Plan: `yarn jest` passed in `packages/react-native-codegen`

Reviewed By: RSNara

Differential Revision: D39322001

Pulled By: cipolleschi

fbshipit-source-id: 1855711da7062a065c05a10f275e26baa88cf75f
2022-09-09 08:05:29 -07:00
..
buck_tests Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
e2e Build RN Tester with CMake (#33937) 2022-06-06 08:07:14 -07:00
scripts Use realpath instead of readlink 2022-02-22 02:23:02 -08:00
src Support TypeScript type `(T)` for turbo module codegen (module only) (#34621) 2022-09-09 08:05:29 -07:00
.babelrc Rewrite ObjC++ module generator 2020-09-29 14:39:40 -07:00
.prettierrc JS: Upgrade to Prettier v2.4.1 [1/n] 2021-11-02 22:14:16 -07:00
BUCK Apply lint updates from buildifier in xplat 2022-07-24 13:46:21 -07:00
DEFS.bzl Remove molly dep from react-native buck graph 2022-08-11 04:53:34 -07:00
README.md docs: add README and specify file in package.json (#28507) 2020-04-03 11:34:58 -07:00
package.json Update flow-parser for react-native-codegen and eslint-plugin-spec 2022-08-18 11:32:01 -07:00

README.md

react-native-codegen

Version

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