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

Using typescript other than VSCode's version fails to type check inside <template> #1507

Closed
jerryc05 opened this issue Jun 25, 2022 · 2 comments

Comments

@jerryc05
Copy link

jerryc05 commented Jun 25, 2022

Assume a .vue file like this:

<template>
  <div @click="someVariableThatDoesNotExist"/>
</template>

vscode's version of ts (=v4.7.3) works well in detecting that the variable does not exist:

Cannot find name 'someVariableThatDoesNotExist'. ts(2304)

However, when I switched to workspace's version of ts (regardless of version, but I tried v4.7.4 and v4.8.0-dev.20220624), vscode no longer shows the error.

Switching back to vscode's version of ts makes this problem show up again.

Note that I am switching ts using command provided by volar.

Any thoughts?


Interestingly, a fresh install of vscode and volar sometimes works with workspace's ts (but it only worked once).

However, after I turn on my account's settings sync (which syncs settings and extensions), then turn it off, then uninstall all extension except volar, and remove everything in vscode's settings.json (trying my best to turn vscode into its fresh-installed state), workspace's ts does not work from then on, no matter what I do.

I suspect that some built-in extensions might be the cause, because there were merge conflicts between my account's settings sync and the default vscode ones. After merging, this issue occurs.


vscode: 1.69.0-insider (user setup)
volar: v0.38.1

@johnsoncodehk
Copy link
Member

Thanks for the report, but I can't reproduce this problem. Can you reproduce in https://github.com/johnsoncodehk/volar-starter?

@jerryc05
Copy link
Author

jerryc05 commented Jul 16, 2022

Thanks for the report, but I can't reproduce this problem. Can you reproduce in https://github.com/johnsoncodehk/volar-starter?

Yes I can reproduce with typescript@next (change from latest to next)
image

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

No branches or pull requests

2 participants