mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: > [Codegen 83 - assigned to Pranav-yadav] Create a function throwIfIncorrectModuleRegistryCallArgumnent function in the errors.js file and factor together the code from [Flow](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/flow/modules/index.js#L407-L415) and [TypeScript](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/typescript/modules/index.js#L513-L521). Update the Parsers to return the right Literl type Merged `Flow` and `TS` Parsers' `IncorrectModuleRegistryCallArgumentTypeParserError` error-emitting code - into `throwIfIncorrectModuleRegistryCallArgument` fun in `error-utils.js` ## Changelog [INTERNAL] [CHANGED] - Merge `Flow` and `TS` Parsers' `IncorrectModuleRegistryCallArgumentTypeParserError` error-emitting code Pull Request resolved: https://github.com/facebook/react-native/pull/36252 Test Plan: - `yarn test` Reviewed By: rshest Differential Revision: D43502843 Pulled By: cipolleschi fbshipit-source-id: eb63b40d433f90134a80c02c8f750257c82104a3
@react-native/codegen
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:
yarnto install the dependencies. You just need to run this onceyarn jest react-native-codegen.