Files
react-native/packages/react-native-codegen
tarunrajput 8ffaede05a add handleGenericTypeAnnotation in parser-commons (#37525)
Summary:
Part of https://github.com/facebook/react-native/issues/34872
Move the switch construct from [parsers/typescript/utils.js](https://github.com/facebook/react-native/blob/e133100721939108b0f28dfa9f60ac627c804018/packages/react-native-codegen/src/parsers/typescript/utils.js#L59-L93) and [parsers/flow/utils.js](https://github.com/facebook/react-native/blob/e133100721939108b0f28dfa9f60ac627c804018/packages/react-native-codegen/src/parsers/flow/utils.js#L56-L81) to the parsers-commons.js file, in a handleGenericTypeAnnotation function. Use that function in place of the switch.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal][Added]: Added handleGenericTypeAnnotation in parsers-commons

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

Test Plan: `yarn test`

Reviewed By: cortinico

Differential Revision: D46264650

Pulled By: cipolleschi

fbshipit-source-id: a315ee8cad24d91c9e98e5533d4cdc8b43ebc9a0
2023-06-06 02:31:51 -07:00
..
2022-02-22 02:23:02 -08:00
2020-09-29 14:39:40 -07:00
2023-05-18 14:05:38 -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 packages/react-native-codegen.