-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extract throwIfEventHasNoName into error-utils (#37071)
Summary: Part of Codegen ☂️ Issue: #34872 > Extract the typeAnnotation doesn't have a name error ([Flow](https://github.com/facebook/react-native/blob/e133100721939108b0f28dfa9f60ac627c804018/packages/react-native-codegen/src/parsers/flow/components/events.js#L120-L122); [TypeScript](https://github.com/facebook/react-native/blob/e133100721939108b0f28dfa9f60ac627c804018/packages/react-native-codegen/src/parsers/typescript/components/events.js#L138-L140)) in throwIfEventHasNoName function which takes a typeAnnotation and a parser as parameters. Use it in place of the if in the above call sites. ## 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] - Extract throwIfEventHasNoName error from parsers components events in error-utils Pull Request resolved: #37071 Test Plan: `yarn jest react-native-codegen` <img width="810" alt="image" src="https://user-images.githubusercontent.com/34857453/234091461-67ec4187-1f38-43e0-a4ae-eb3716377665.png"> Reviewed By: cipolleschi Differential Revision: D45247751 Pulled By: rshest fbshipit-source-id: ad286bfbb5c9471477981ec26da77a2b0f827732
- Loading branch information
1 parent
0e5d54a
commit c65ab4d
Showing
6 changed files
with
80 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters