Skip to content

Add regression test for JSX runtime resolution in scripts - #64444

Closed
GermanoB (germanao) wants to merge 1 commit into
microsoft:mainfrom
germanao:fix-jsx-runtime-script-diagnostic-64438
Closed

GermanoB (germanao) wants to merge 1 commit into
microsoft:mainfrom
germanao:fix-jsx-runtime-script-diagnostic-64438

Conversation

@germanao

@germanao GermanoB (germanao) commented Sep 25, 2026 •

Copy link
Copy Markdown

Summary

  • Add a compiler regression case for JSX in a script with jsxImportSource pointing to an installed runtime package.
  • Cover the matching file with export {} and verify both resolve JSX.Element from the runtime.
  • Cover the current compiler behavior, which avoids the misleading TS2875 and TS7026 diagnostics reported in Incorrect/unhelpful error message for non-module jsx file #64438. The case still reproduces those diagnostics with TypeScript 6.0.3.

Related to #64438. This PR adds regression coverage; it does not change compiler behavior or the wording of those diagnostics in TypeScript 6.0.3.

Validation

  • go -C ./tsc test -run 'TestLocal/jsxRuntimeScriptDiagnostic' ./internal/testrunner — passed.
  • npx hereby check:format — passed.

AI assistance

This PR was authored with Codex AI assistance. I will review the patch and handle maintainer feedback.

Copilot AI balanced review requested due to automatic review settings September 25, 2026 13:00
@typescript-automation typescript-automation Bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Sep 25, 2026
@typescript-automation

Copy link
Copy Markdown

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused regression test and generated baselines consistently validate the intended behavior.

Review effort: Balanced
Findings: None

What changed in this PR

Adds regression coverage for JSX runtime resolution in script and module files.

Changes:

  • Adds a NodeNext JSX runtime fixture.
  • Confirms runtime JSX.Element and intrinsic symbol resolution.
  • Records expected type, symbol, and emit baselines.
File Description
jsxRuntimeScriptDiagnostic.tsx Defines the regression scenario.
jsxRuntimeScriptDiagnostic.types Verifies inferred JSX types.
jsxRuntimeScriptDiagnostic.symbols Verifies intrinsic symbol resolution.
jsxRuntimeScriptDiagnostic.js Records expected emit.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@germanao

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@germanao
GermanoB (germanao) deleted the fix-jsx-runtime-script-diagnostic-64438 branch September 25, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants