38fcafe623
Summary: This PR aims to reduce code duplication by extracting `createParserErrorCapturer` function from the flow and typescript folders into a shared parsers/utils.js file. It is a task of https://github.com/facebook/react-native/issues/34872: > Extract the function createParserErrorCapturer ([Flow](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/flow/utils.js#L122-L143) [TypeScript](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/typescript/utils.js#L114-L135)) into a single function in the parsers/utils.js file and replace its invocation with this new function. ## 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 function createParserErrorCapturer into a single function in the parsers/utils.js file Pull Request resolved: https://github.com/facebook/react-native/pull/34934 Test Plan: yarn flow: <img width="628" alt="image" src="https://user-images.githubusercontent.com/40902940/194948886-d6763e39-ea07-4004-86cc-5287c4783012.png"> yarn lint: <img width="509" alt="image" src="https://user-images.githubusercontent.com/40902940/194948916-3e54afa5-7e0b-4a61-ac18-8ec306d8c6d4.png"> yarn jest react-native-codegen: <img width="386" alt="image" src="https://user-images.githubusercontent.com/40902940/194948966-d1e5b12e-02ab-4d53-a4bf-6abaf4d70fbe.png"> Reviewed By: cipolleschi Differential Revision: D40256048 Pulled By: cipolleschi fbshipit-source-id: 098519a17d6e3128d236c639b246a706f9dbf66d |
||
---|---|---|
.. | ||
__tests__ | ||
with-babel-register | ||
BUCK | ||
index.js | ||
package.json | ||
postpack.js | ||
prepack.js | ||
react-native-modules.js |