Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove reference not found errors from jsx: preserve #60687

Merged
merged 5 commits into from
Dec 9, 2024

Conversation

iisaduan
Copy link
Member

@iisaduan iisaduan commented Dec 4, 2024

Fixes #60603

Cleans up a lot of errors that shouldn't have been included with #59933. From discussion with @andrewbranch:

  • preserve shouldn't perform the check
  • react should check for React in scope, and jsx/jsxFrag pragmas should check if entity name is in scope
  • react-jsx, react-jsx-dev, settings and jsxImportSource pragma should check that the corresponding module can be imported

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Dec 4, 2024
@iisaduan iisaduan requested a review from weswigham December 6, 2024 00:32
@iisaduan
Copy link
Member Author

iisaduan commented Dec 6, 2024

I found that a lot of the errors generated in the original PR seem to be incorrect as well. The most recent change removes those, and adds some more tests to show the behavior with the rest of the jsx options

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could do // @noTypesAndSymbols: true and maybe even // @noEmit: true since we really only care about errors for these tests

@iisaduan iisaduan merged commit 3d2b8f3 into microsoft:main Dec 9, 2024
2 checks passed
@iisaduan
Copy link
Member Author

iisaduan commented Dec 9, 2024

@typescript-bot cherry-pick this to release-5.7

@typescript-bot
Copy link
Collaborator

typescript-bot commented Dec 9, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
cherry-pick this to release-5.7 ✅ Started ✅ Results

@typescript-bot
Copy link
Collaborator

Hey, @iisaduan! I've created #60721 for you.

DanielRosenwasser pushed a commit that referenced this pull request Dec 9, 2024
…e-5.7 (#60721)

Co-authored-by: Isabel Duan <isabelduan@microsoft.com>
@iisaduan iisaduan deleted the fragment-preserve branch December 9, 2024 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Since 5.7.2: Using JSX fragments requires fragment factory 'React' to be in scope, but it could not be found.
4 participants