mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: This PR is part of https://github.com/facebook/react-native/issues/34872. This PR contains two changes, extracting the visitor object and then factoring out the `getConfigType()` function to the `parsers/utils.js` file. Then we can reuse the same function in both flow and typescript by passing the extracted visitor object. ## Changelog [Internal] [Changed] - Extract visitor object in the same file and factor out `getConfigType()` to `parsers/utils.js`. Pull Request resolved: https://github.com/facebook/react-native/pull/35035 Test Plan: Output of `yarn jest react-native-codegen` ensures all passed test cases Reviewed By: cortinico Differential Revision: D40548855 Pulled By: cipolleschi fbshipit-source-id: 310b8565322a4e4800a3fffc67479a9dfa45d620
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.