Files
react-native/packages/react-native-codegen
Antoine Doubovetzky 29e5655dee extract assertGenericTypeAnnotationHasExactlyOneTypeParameter to parsers-commons (#34933)
Summary:
This PR is a task from https://github.com/facebook/react-native/issues/34872:
> Extract the function assertGenericTypeAnnotationHasExactlyOneTypeParameter ([Flow](https://github.com/facebook/react-native/blob/b444f0e44e0d8670139acea5f14c2de32c5e2ddc/packages/react-native-codegen/src/parsers/flow/modules/index.js#L441) [TypeScript](https://github.com/facebook/react-native/blob/00b795642a6562fb52d6df12e367b84674994623/packages/react-native-codegen/src/parsers/typescript/modules/index.js#L476)) into a single function in the parsers-common.js file and replace its invocation with this new function.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal] [Changed] - Extract assertGenericTypeAnnotationHasExactlyOneTypeParameter from the flow and typescript folders to parsers-commons

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

Test Plan: I tested using jest and flow commands.

Reviewed By: cipolleschi

Differential Revision: D40257022

Pulled By: cipolleschi

fbshipit-source-id: 609972914deade9afdd1c0cf1e17be1c08c1d37b
2022-10-11 05:22:59 -07:00
..
2022-02-22 02:23:02 -08:00
2020-09-29 14:39:40 -07:00
2022-10-10 15:42:06 -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.