Skip to content

[Codegen] Use parser instead of language in MissingTypeParameterGenericParserError and MoreThanOneTypeParameterGenericParserError#35294

Closed
AntoineDoubovetzky wants to merge 2 commits into
facebook:mainfrom
AntoineDoubovetzky:refactor/pass-parser-to-MissingTypeParameterGenericParserError-and-MoreThanOneTypeParameterGenericParserError
Closed

[Codegen] Use parser instead of language in MissingTypeParameterGenericParserError and MoreThanOneTypeParameterGenericParserError#35294
AntoineDoubovetzky wants to merge 2 commits into
facebook:mainfrom
AntoineDoubovetzky:refactor/pass-parser-to-MissingTypeParameterGenericParserError-and-MoreThanOneTypeParameterGenericParserError

Conversation

@AntoineDoubovetzky
Copy link
Copy Markdown

Summary

Part of #34872:

Update the IncorrectlyParameterizedGenericParserError error in the error.js file to accept a Parser instead of a ParserType parameter. Use the nameForGenericTypeAnnotation method of the parser to extract the genericName and delete the ternary operator.

Since the task was added to the issue we split the IncorrectlyParameterizedGenericParserError into 2 errors: MissingTypeParameterGenericParserError and MissingTypeParameterGenericParserError (#35134), so I applied the change on both errors.

Changelog

[Internal] [Changed] - Use parser instead of language in MissingTypeParameterGenericParserError and MoreThanOneTypeParameterGenericParserError

Test Plan

I tested using Flow and Jest commands. More specifically, the tests that cover this change are the ones I renamed.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 9, 2022
@analysis-bot
Copy link
Copy Markdown

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,069,968 -31,721
android hermes armeabi-v7a 6,442,099 -29,382
android hermes x86 7,485,007 -34,251
android hermes x86_64 7,344,670 -33,210
android jsc arm64-v8a 8,934,550 -31,333
android jsc armeabi-v7a 7,668,661 -29,005
android jsc x86 8,994,599 -33,873
android jsc x86_64 9,473,532 -32,828

Base commit: 1f0c2c2
Branch: main

@analysis-bot
Copy link
Copy Markdown

analysis-bot commented Nov 9, 2022

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 3d9a3b7
Branch: main

@pull-bot
Copy link
Copy Markdown

pull-bot commented Nov 9, 2022

PR build artifact for 464f7fc is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@cortinico cortinico added the Merged This PR has been merged. label Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants