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

Add a test for JSX namespace lookup with jsx: preserve, jsxImportSource #41676

Conversation

Andarist
Copy link
Contributor

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 for jsxImportSource to work but apparently it isn't:

compilerOptions.jsxImportSource ||

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

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Nov 24, 2020
@typescript-bot
Copy link
Collaborator

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
Copy link
Contributor Author

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?

Copy link
Member

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.

@sandersn sandersn added this to Not started in PR Backlog Dec 1, 2020
@sandersn sandersn moved this from Not started to Waiting on author in PR Backlog Dec 1, 2020
PR Backlog automation moved this from Waiting on author to Needs merge Mar 10, 2021
Copy link
Member

@sandersn sandersn left a 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?

@sandersn
Copy link
Member

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 sandersn merged commit 998ecd9 into microsoft:master Mar 11, 2021
PR Backlog automation moved this from Needs merge to Done Mar 11, 2021
@Andarist
Copy link
Contributor Author

@sandersn thanks for taking care of this! Was planning to do it later today but u beat me to it 😉

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
PR Backlog
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants