mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: This PR is a part of https://github.com/facebook/react-native/issues/34872 This PR extracts Extract the `nullGuard` function ([Flow](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/typescript/modules/index.js#L74-L76), [TypeScript](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/typescript/modules/index.js#L74-L76)) into a function in the `parsers-utils.js` file ## Changelog [Internal] [Changed] - Extracted `nullGuard` function from flow and typescript to a file `parsers-utils.js`. Pull Request resolved: https://github.com/facebook/react-native/pull/34952 Test Plan: yarn jest react-native-codegen <img width="1042" alt="Screenshot 2022-10-12 at 12 52 02 PM" src="https://user-images.githubusercontent.com/22423684/195277414-dc0122f4-603a-4e93-aef1-2ac0c33a960d.png"> Reviewed By: NickGerleman Differential Revision: D40296951 Pulled By: cipolleschi fbshipit-source-id: 4fb305fff2e28025496b65ec697d2a59cff77bde
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.