False-positive error showing when importing a Typescript interface
See original GitHub issue- I have searched through existing issues
- I have read through docs
- I have read FAQ
- I have tried restarting VS Code or running
Vetur: Restart VLS
Info
- Platform: macOs
- Vetur version: 0.32.0
- VS Code version: 1.52.1
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 typed emit
event using vue-property-decorator
:
@Emit('update') updateUser(user:User) {}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:9 (2 by maintainers)
Top Results From Across the Web
False-positive error showing when importing a Typescript interface
[x] I have searched through existing issues; [x] I have read through docs; [x] I have read FAQ; [x] I have tried restarting...
Read more >False positive Typescript cannot find module warning
The import works fine (i.e. WebPack builds the bundle with no errors), though I'd really like to get rid of this warning. Any...
Read more >JavaScript/TypeScript false positive with absolute imports
Version SonarQube Version 8.4.2 (build 36762) Error observed and steps to reproduce My TypeScript project uses absolute imports.
Read more >Template type checking - Angular
Just as TypeScript catches type errors in your code, Angular checks the ... There can also be false positives when the typings of...
Read more >How to fix a 'declared but its value is never read' false positive ...
Chances are you really have an unused variable (or parameter depending on that the actual error is). My best guess would be a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So, no solution?
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. I’ve love to use Vetur Validation Interpolation when this gets resolved.