Skip to content

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
@iisaduan iisaduan deleted the fragment-preserve branch December 9, 2024 21:22
@sandersn sandersn removed this from PR Backlog Apr 22, 2025
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

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