mirror of
https://github.com/react/react-native.git
synced 2026-09-28 13:23:09 +08:00
Summary: > Create a function emitStringProp(name: string, optional: boolean) in parser-primitives.js. Factor out the code from [Flow](https://github.com/facebook/react-native/blob/d8ced6f8953cd896471983714e722caf50783960/packages/react-native-codegen/src/parsers/flow/components/events.js#L45-L51) and [TypeScript](https://github.com/facebook/react-native/blob/d8ced6f8953cd896471983714e722caf50783960/packages/react-native-codegen/src/parsers/typescript/components/events.js#L57-L61) into that function. Use that function in the original call site. bypass-github-export-checks ## Changelog: [INTERNAL][ADDED] - emitStringProp in parser-primitves Pull Request resolved: https://github.com/facebook/react-native/pull/37527 Test Plan: `yarn jest packages/react-native-codegen` Reviewed By: cortinico Differential Revision: D46144200 Pulled By: cipolleschi fbshipit-source-id: 076b530905ba7c28cfb2151e29e589026010c3c3
@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 packages/react-native-codegen.