Closed Leon0402 closed 2 years ago
Duplicate of #844
@johnsoncodehk I don't understand why this is a duplicate?
In the explanation you mention that the extension is not able to show errors, which are a result of the wrong type. This make sense, because javascript doesn't have these types. But in my explample, a prop is just missing and there is no error message for it. What is the explanation for this?
@Leon0402 You should config checkJs
in tsconfig / jsconfig to enable type-checking for lang="js"
.
@Leon0402 You should config
checkJs
in tsconfig / jsconfig to enable type-checking forlang="js"
.
Thanks this worked! It still doesn't find missing imports in the template section, but this seems to be true for typescript as well. I assume this is a different issue
@Leon0402 if you're using @vue/composition-api
, see https://github.com/johnsoncodehk/volar/issues/1350.
I think I got the same issue:
~Shouldn't test
show an error here since it is not defined anywhere? I'm only using the Vue - Official plugin.~
Nevermind! The issue was related to a styled-components plugin that broke the Vue plugins hybrid mode. I forcefully enabled it, because I thought the styled-components plugin was limited to React and therefore probably a false positive. Everything is working fine now again.
I use
https://github.com/johnsoncodehk/volar-starter
to be sure to not have misconfigured anything and installed the normal volar & volar ts vs code extensions.In general, there are no error messages about missing imports for components. For instance:
No error message about the missing
HelloWorld
import.And if I don't use
lang="ts"
there are no error messages at all anymore. See the same example:No error message about the missing prop.