mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: This PR is a task from https://github.com/facebook/react-native/issues/34872: > Extract the UnsupportedFunctionParamTypeAnnotationParserError in its own throwing function (if it does not exists already) and reuse that function passing a proper type. Then, refactor the code using a dictionary and avoiding the three different ifs in both parsers. ## 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] - Extract the UnsupportedFunctionParamTypeAnnotationParserError in its own throwing function in error-utils Pull Request resolved: https://github.com/facebook/react-native/pull/35057 Reviewed By: lunaleaps Differential Revision: D40721099 Pulled By: cipolleschi fbshipit-source-id: af5e4cd275d0049047d35660559b94a27e660e40