mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
62244d4a1e
Summary: This PR extracts the codegen `translateFunctionTypeAnnotation` Flow and TypeScript functions into a single common function in the `parsers-primitives.js` file that can be used by both parsers as requested on https://github.com/facebook/react-native/issues/34872. ## Changelog [Internal] [Changed] - Extract codegen `translateFunctionTypeAnnotation` into a common function in the` parsers-primitives.js` file Pull Request resolved: https://github.com/facebook/react-native/pull/35182 Test Plan: Run `yarn jest react-native-codegen` and ensure CI is green  Reviewed By: cortinico Differential Revision: D41030544 Pulled By: rshest fbshipit-source-id: bc93c21e31ed4e8c3293cafe3d808d9f36cf8ecc
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.