Skip to content

Changed to check for the existence of .vue files by the embedded source extension #487

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

Merged
merged 1 commit into from
Jul 25, 2020

Conversation

Yama-Tomo
Copy link
Contributor

background

The type information of the .vue file written by lang='tsx' cannot be imported correctly, because there is a bug in the file existence check and it cannot be load.

details

Typescript module resolution order is .ts, .tsx, .d.ts, package.json ...., so the .ts extension is processed before the .tsx extension.
File existence check as a .ts returns true (*1), but the file cannot be loaded correctly because the subsequent check by the embedded source extension is false(*2).
Also, the module is considered resolved as a .ts, which causes problems with checking jsx statements.

Expected behavior in *1 is that a check as a .ts should return false and a check as a .tsx should return true.

Thanks!

@codeclimate
Copy link

codeclimate bot commented Jul 23, 2020

Code Climate has analyzed commit f5c0e15 and detected 0 issues on this pull request.

View more on Code Climate.

Copy link
Collaborator

@piotr-oles piotr-oles left a comment

Choose a reason for hiding this comment

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

Nice! 👍

@piotr-oles piotr-oles merged commit 756d214 into TypeStrong:master Jul 25, 2020
@piotr-oles
Copy link
Collaborator

🎉 This PR is included in version 5.0.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants