mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Summary: This PR reduces code duplication by extracting all the errors in the module/errors into a single parsers/errors.js file. All the errors must drop the corresponding Flow or Typescript token in the name and take an extra language parameter in the constructor. Also, rename the hasteModuleName parameter to nativeModuleName. Part of https://github.com/facebook/react-native/issues/34872 ## 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 all the parsers errors in the module/errors into a single parsers/errors.js file Pull Request resolved: https://github.com/facebook/react-native/pull/34896 Test Plan: run ```yarn jest react-native-codegen``` and check all test case passes. <img width="793" alt="image" src="https://user-images.githubusercontent.com/34857453/194545577-cf2d980b-b6b7-4f93-b13e-2e45d92dceab.png"> Reviewed By: rshest Differential Revision: D40176486 Pulled By: rshest fbshipit-source-id: b33ae49b2bcceeffd307370ee5e3b24a9e1bb340