mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
371e263847
Summary: > Create a throwIfPartialNotAnnotatingTypeParameter function in the error-utils.js file and extract the error-emitting code from [Flow](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/flow/modules/index.js#L174-L178) and [Typescript](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/typescript/modules/index.js#L252-L259) index files. Notice that the way in which the annotatedElement is computed is different, therefore we should add an extractAnnotatedElement function to the Flow and TypeScript parsers. Part of the Codegen ☂️ Issue https://github.com/facebook/react-native/issues/34872 ## 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] [Changed] - create throwIfPartialNotAnnotatingTypeParameter and add extractAnnotatedElement method in parsers Pull Request resolved: https://github.com/facebook/react-native/pull/36272 Test Plan: `yarn jest react-native-codegen` Reviewed By: cipolleschi Differential Revision: D43564134 Pulled By: rshest fbshipit-source-id: 89a6567340a560d7b6c353cfff8a43e2dd0f76cc