question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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) {}

image

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
duola8789commented, Aug 9, 2021

So, no solution?

3reactions
calebwaldnercommented, Sep 30, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found