mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
fd4451ecfa
Summary: Part of https://github.com/facebook/react-native/issues/34872 This PR extracts the content of the case 'Object' ([Flow](https://github.com/facebook/react-native/blob/b444f0e44e0d8670139acea5f14c2de32c5e2ddc/packages/react-native-codegen/src/parsers/flow/modules/index.js#L365-L367), [TypeScript](https://github.com/facebook/react-native/blob/00b795642a6562fb52d6df12e367b84674994623/packages/react-native-codegen/src/parsers/typescript/modules/index.js#L400-L402)) into a single emitObject function in the parsers-primitives.js file. Use the new function in the parsers. ## Changelog [Internal] [Changed] - Extract contents of the case 'Object' into a single emitObject function Pull Request resolved: https://github.com/facebook/react-native/pull/34926 Test Plan: <img width="276" alt="image" src="https://user-images.githubusercontent.com/18408823/194892107-1da9d6e5-c659-47f9-8597-ff4a4b7710ca.png"> Reviewed By: rshest Differential Revision: D40231670 Pulled By: cipolleschi fbshipit-source-id: db6a61427c8c020d48be5317b094f136842b62ca
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.