GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove reference not found errors from `jsx: preserve` by iisaduan · Pull Request #60687 · microsoft/TypeScript

Conversation

@iisaduan

@iisaduan Isabel Duan (iisaduan) commented Dec 4, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Fixes #60603

Cleans up a lot of errors that shouldn't have been included with #59933. From discussion with Andrew Branch (@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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Isabel Duan (iisaduan) added 3 commits December 4, 2024 14:45
@iisaduan
add tests
67ea053
@iisaduan
fix preserve errors
092e1f4
@iisaduan
add tests for if pragma specified with preserve
5b2f635
@typescript-bot TypeScript Bot (typescript-bot) assigned Isabel Duan (iisaduan) Dec 4, 2024
@typescript-bot TypeScript Bot (typescript-bot) added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Dec 4, 2024
@iisaduan
Isabel Duan (iisaduan) requested review from Andrew Branch (andrewbranch) and Wesley Wigham (weswigham) December 4, 2024 23:55
weswigham
Wesley Wigham (weswigham) reviewed Dec 5, 2024
View reviewed changes
Comment thread tests/baselines/reference/jsxFragmentFactoryReference(jsx=react-jsx).errors.txt Resolved

Uh oh!

There was an error while loading. Please reload this page.

@iisaduan
remove extra errors
55e3b0a
@iisaduan
Isabel Duan (iisaduan) requested a review from Wesley Wigham (weswigham) December 6, 2024 00:32
@iisaduan

Isabel Duan (iisaduan) commented Dec 6, 2024

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

andrewbranch
Andrew Branch (andrewbranch) approved these changes Dec 9, 2024
View reviewed changes
Comment thread tests/baselines/reference/jsxRuntimePragma(jsx=preserve).types

@andrewbranch Andrew Branch (andrewbranch) Dec 9, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@iisaduan
remove extra tests
8ebd322
@iisaduan
Isabel Duan (iisaduan) merged commit 3d2b8f3 into microsoft:main Dec 9, 2024
@iisaduan

Isabel Duan (iisaduan) commented Dec 9, 2024

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) cherry-pick this to release-5.7

typescript-bot reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 9, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

TypeScript Bot (typescript-bot) pushed a commit that referenced this pull request Dec 9, 2024
@iisaduan @typescript-bot
Remove reference not found errors from jsx: preserve (#60687)
a1d088f
@typescript-bot TypeScript Bot (typescript-bot) mentioned this pull request Dec 9, 2024
🤖 Pick PR #60687 (Remove reference not found errors f...) into release-5.7 #60721
Merged
@typescript-bot

TypeScript Bot (typescript-bot) commented Dec 9, 2024

Copy link
Copy Markdown
Contributor

Hey, Isabel Duan (@iisaduan)! I've created #60721 for you.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Daniel Rosenwasser (DanielRosenwasser) pushed a commit that referenced this pull request Dec 9, 2024
@typescript-bot @iisaduan
🤖 Pick PR #60687 (Remove reference not found errors f...) into releas…
2d11280
…e-5.7 (#60721)

Co-authored-by: Isabel Duan <[email protected]>
@iisaduan
Isabel Duan (iisaduan) deleted the fragment-preserve branch December 9, 2024 21:22
@sandersn Nathan Shively-Sanders (sandersn) removed this from PR Backlog Apr 22, 2025
@Andarist Mateusz Burzyński (Andarist) mentioned this pull request Jun 4, 2025
Port JSX fragment checking changes microsoft/typescript-go#1053
Merged
@microsoft 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.

Reviewers

@andrewbranch Andrew Branch (andrewbranch) andrewbranch approved these changes
@weswigham Wesley Wigham (weswigham) Awaiting requested review from weswigham

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@iisaduan Isabel Duan (iisaduan)

Labels

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

Projects

None yet

Milestone

No milestone

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.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@iisaduan @typescript-bot @weswigham @andrewbranch
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.