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
Add a test for JSX namespace lookup with jsx: preserve, jsxImportSource
#41676
Add a test for JSX namespace lookup with jsx: preserve, jsxImportSource
#41676
Conversation
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
@@ -1,5 +1,5 @@ | |||
// @strict: true | |||
// @jsx: react-jsx | |||
// @jsx: preserve,react-jsx |
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.
I have no idea what's expected result of @jsx: react
+ @jsxImportSource: @emotion/react
though. It seems like it could be considered an invalid combination?
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.
We could issue an error in program.ts
(within verifyCompilerOptions
) - that's probably fine.
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.
I think this is a decent test to add -- @Andarist can you get it up to date with master so I can merge it?
Note: when I merged from master, I did so when master was broken from some other very-old PRs I recently merged, so this PR now includes a couple of unrelated baseline updates. |
@sandersn thanks for taking care of this! Was planning to do it later today but u beat me to it 😉 |
This is just a simple follow-up to #41476 which aims to add a regression test that seems to be sufficiently different from the one provided in that PR. At the time I have been providing that former PR I have thought that
jsx: react-jsx,react-jsxdev
is a requirement forjsxImportSource
to work but apparently it isn't:TypeScript/src/compiler/utilities.ts
Line 6039 in d070acf
I'm glad that it actually works with
jsx: preserve
so I thought it might be a good idea to provide a test for this