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

When jsx is react-jsx or react-jsxdev, a JSX tag should imply the file is a module #40501

Closed
weswigham opened this issue Sep 11, 2020 · 1 comment · Fixed by #47495
Closed
Assignees
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue Rescheduled This issue was previously scheduled to an earlier milestone

Comments

@weswigham
Copy link
Member

This is a followup for #39199 to track automatic moduleness for jsx-using files.

@weswigham
Copy link
Member Author

I spoke with @RyanCavanaugh on this a little bit - accomplishing this would require contorting our parser API in very breaky ways (we cannot, at present, configure it based on compiler options); since we're not sure you can write a particularly useful JSX-containing file with no module markers at all, we're going to punt on this one for awhile. In the meantime, the standard workaround of "just add a module marker (like export {}) to the file" applies if anyone ever finds themselves in a situation where they've made a not-obviously-a-module file containing JSX using the new transforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue Rescheduled This issue was previously scheduled to an earlier milestone
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants