mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
edc4ea0a67
Summary: Part of https://github.com/facebook/react-native/issues/34872: > Update the [IncorrectlyParameterizedGenericParserError](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/errors.js#L134) error in the error.js file to accept a Parser instead of a ParserType parameter. Use the nameForGenericTypeAnnotation method of the parser to extract the genericName and delete the ternary operator. Since the task was added to the issue we split the IncorrectlyParameterizedGenericParserError into 2 errors: MissingTypeParameterGenericParserError and MissingTypeParameterGenericParserError (https://github.com/facebook/react-native/pull/35134/), so I applied the change on both errors. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Internal] [Changed] - Use parser instead of language in MissingTypeParameterGenericParserError and MoreThanOneTypeParameterGenericParserError Pull Request resolved: https://github.com/facebook/react-native/pull/35294 Test Plan: I tested using Flow and Jest commands. More specifically, the tests that cover this change are the ones I renamed. Reviewed By: christophpurrer Differential Revision: D41181069 Pulled By: cipolleschi fbshipit-source-id: 3412e29b1319a28b3ec6afb38b1eda448055fa6a