mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
969a8d0799
Summary: > [Codegen 101] The code of getCommandProperties is almost identical in [Flow](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/flow/components/index.js#L128) and [TS](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/typescript/components/index.js#L129). There are small differences between flow/ts, so we need for it to accept a Parser object. Enrich the parser object with the required methods if necessary. ## Changelog: [Internal] [Changed] - Enrich getCommandProperties with the parser object Pull Request resolved: https://github.com/facebook/react-native/pull/36500 Test Plan: `yarn test react-native-codegen` Reviewed By: cortinico Differential Revision: D44415265 Pulled By: cipolleschi fbshipit-source-id: ed13b553a6f782beb0f1aec79bd17d865a96fac9
@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.