mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: [Codegen 104] This PR introduces `getResolvedTypeAnnotation` to the Parser class and implements this function in Typescript and Flow Parsers. We also get rid of usages `resolveTypeAnnotation` from : - `packages/react-native-codegen/src/parsers/typescript/utils.js` - `packages/react-native-codegen/src/parsers/flow/utils.js` and replace it with `parsers.getResolvedTypeAnnotation` as requested on https://github.com/facebook/react-native/issues/34872 bypass-github-export-checks ## Changelog: [Internal] [Changed] - Add `getResolvedTypeAnnotation ` to Parsers and update usages. Pull Request resolved: https://github.com/facebook/react-native/pull/37373 Test Plan: Run yarn jest react-native-codegen and ensure CI is green Reviewed By: dmytrorykun Differential Revision: D45865651 Pulled By: cipolleschi fbshipit-source-id: fdce6e5059306ebe67121aa1b212e67de864bf84
@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.