-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
False-positive error showing when importing a Typescript interface #2668
Comments
If you can provide a repro project, we can study it quickly. |
@yoyo930021 Will do, definetly think it comes from In this file I have this component: The event in question in |
|
So, no solution? |
Any workarounds for this issue? It's not just a false-positive error, since the template checker can't find / import the type, in the template the prop shows up as "any" so type checking for that subcomponent is bypassed as well. A good and simple repro is here: #2857 (comment) Edit: FWIW switching to Volar solved this and many other issues for me. Absolutely not a dig for Vetur contributors here, just that Volar saved the day for me! |
Same problem here |
Wow, Volar did the trick for me too. I tried what @earslap suggested using Volar and it seems to work. I had to disable Vetur>Validation Interpolation as well, but Volar seems to be fulfilling the gap for the time being. |
Still experiencing this issue, though switching to Volar for the time being does seem to solve it. |
This happened to me because @props and @emit from vue-property-decorator were using typescript types as Objects. I couldn't fix it for emits, but for props you need to use "import type" instead of "import" on interfaces It is possible to ask eslint to fix this, using |
Vetur: Restart VLS
Info
Problem
In a lot of files I have this error showing when using Typescript interfaces.
I think it's coming from
templateProps
and infered emit events because generaly the type concerned is used in components props or in the typedemit
event usingvue-property-decorator
:The text was updated successfully, but these errors were encountered: