You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@cipolleschi I fixed some of the flow-checks errors. Now is missing the following one:
But I'm not able to fix because it starts to trigger the following one:
Should I type the parserType param as string, $FlowFixMe, 'Flow' | 'Typescript' or which is the correct way?
Hi @Marcoo09!
The problem is in how you are trying to export the ParserType. As the compiler tells you, Types are erased at runtime. If you want to reuse that type, you have to export it with this syntax in the errors.js
exporttypeParserType
and then you have to use it with the import type syntax:
packages/react-native-codegen/src/parsers/tests/error-utils-test.js#L471 - packages/react-native-codegen/src/parsers/tests/error-utils-test.js line 471 – Describe block title is used multiple times in the same describe block. (jest/no-identical-title)
⚠️
packages/react-native-codegen/src/parsers/typescript/modules/index.js#L56 - packages/react-native-codegen/src/parsers/typescript/modules/index.js line 56 – 'MoreThanOneModuleInterfaceParserError' is assigned a value but never used. (no-unused-vars)
⚠️
packages/react-native-codegen/src/parsers/typescript/modules/index.js#L57 - packages/react-native-codegen/src/parsers/typescript/modules/index.js line 57 – 'ModuleInterfaceNotFoundParserError' is assigned a value but never used. (no-unused-vars)
This file contains hidden or 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
CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.hacktoberfest-acceptedMergedThis PR has been merged.
6 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR is part of #34872
This PR extracts MoreThanOneModuleInterfaceParserError exception to a separate function inside an error-utils.js file
Changelog
[Internal] [Changed] - Extract MoreThanOneModuleInterfaceParserError to a seperate function inside error-utils.js
Test Plan