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 support for the @jsxruntime pragma #59500

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

weswigham
Copy link
Member

Not sure who updated the docs to imply we supported it, but we didn"t, and haven"t since our initial implementation of the new jsx transform. As I said in that PR, supporting it, if we"d like to, is fairly easy. Since it seems like it was assumed we did, here we are.

Fixes #59340

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Aug 1, 2024
@jakebailey
Copy link
Member

That was changed in https://github.com/microsoft/TypeScript-Website/pull/3064/files; we could just remove this line.

Not sure if something like esbuild supports this either?

@andrewbranch
Copy link
Member

Where do the values "classic" and "automatic" come from?

@jakebailey
Copy link
Member

jakebailey commented Aug 1, 2024

I actually think I just missed a typo in the docs; shouldn"t they have been @jsxRuntime react and @jsxRuntime react-jsx to match the jsx config option? ("classic" and "automatic" were I think intended to be the human-readable names)

@weswigham
Copy link
Member Author

Where do the values "classic" and "automatic" come from?

They come from the babel transform.

I actually think I just missed a typo in the docs; shouldn"t they have been @jsxRuntime react and @jsxRuntime react-jsx to match the jsx config option?

Nope. They"re what they are to match what babel supports, nothing more, nothing less. We"re not the originators of these pragmas.

@weswigham weswigham merged commit 8daac14 into microsoft:main Aug 1, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

jsxRuntime pragma does not work
4 participants