mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Part of Codegen Issue: https://github.com/facebook/react-native/issues/34872 > Add a typeAlias: string property to the Parser class. Implement it in the Flow parser so that it returns TypeAlias and in > the TypeScriptParser so that it returns TSTypeAliasDeclaration. Replace the case in the switch in the [parsers/flow/utils.js](https://github.com/facebook/react-native/blob/e133100721939108b0f28dfa9f60ac627c804018/packages/react-native-codegen/src/parsers/flow/utils.js#L57) and [parsers/typescript/utils.js](https://github.com/facebook/react-native/blob/e133100721939108b0f28dfa9f60ac627c804018/packages/react-native-codegen/src/parsers/typescript/utils.js#L60) with this prop. bypass-github-export-checks ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Internal][Added]: Add typeAlias property in parsers Pull Request resolved: https://github.com/facebook/react-native/pull/37334 Test Plan: ```yarn test``` Reviewed By: dmytrorykun Differential Revision: D45691915 Pulled By: cipolleschi fbshipit-source-id: efe5c87afc3193f6a35325190a67f98d64426ab3
@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.