Files
react-native/packages/react-native-codegen
Gabriel Donadel Dall'Agnol ea9e78d426 feat: Extract case Array and ReadOnlyArray into a single emitArrayType function (#35546)
Summary:
This PR extracts the content of the codegen case `'Array'` and `'ReadOnlyArray'` into a single `emitArrayType` function inside the `parsers-primitives.js` file and uses it in both Flow and TypeScript parsers as requested on https://github.com/facebook/react-native/issues/34872. This also adds unit tests to the new `emitArrayType` function.

## Changelog

[Internal] [Changed]  - Extract the content of the case 'Array' and 'ReadOnlyArray'  into a single emitArrayType function

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

Test Plan:
Run `yarn jest react-native-codegen` and ensure CI is green

![image](https://user-images.githubusercontent.com/11707729/205375599-3bbf02bf-85b5-41e6-ae77-fc6e12bee538.png)

Reviewed By: christophpurrer

Differential Revision: D41700084

Pulled By: rshest

fbshipit-source-id: 4bfd2d3ab3f1343bb401ba9c278dc0e0e1ea0989
2022-12-03 14:18:46 -08:00
..
2022-11-23 01:41:23 -08:00
2022-02-22 02:23:02 -08:00
2020-09-29 14:39:40 -07:00

@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

Testing

To run the tests in this package, run the following commands from the react Native root folder:

  1. yarn to install the dependencies. You just need to run this once
  2. yarn jest react-native-codegen.