language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

False ts(6133) error message

Open KamilBeda opened this issue 2 years ago • 5 comments

Issue:

VSCode with latest Volar (1.8.8) complains about values that are declared and never read if values are used inside template with v-else of v-else-if.

Reproduction:

  1. Clone this repo: https://github.com/KamilBeda/nuxt-vs-code-typescript-bug
  2. Install dependencies
  3. Open app.vue and look at the error at doSomething function

Temporary fix:

Reverting Volar to 1.8.7

KamilBeda avatar Aug 03 '23 01:08 KamilBeda

A "minimal" reproduction: https://play.vuejs.org/#eNp9kTFPwzAQhf+KdawlGbqVFAlQBxgAAaOXkF5CimNb9jlEqvLfOTskgFTYnPe+u7xnH+HK2qwPCBsofOVaS8IjBStUqZutBPISLqWTujLak6iNEVtBLuBFFIt8mklEEgg7q0rCpAhR3JjOfp35a3ZFf97WcTsvkiDO4tr8JIbK48QyE9HX0i1okS/ri/zXn2HFyTly3TbZwRvN9Y5xQkLFE61C92Cp5UoSNiI50SuVMh93SYvJVrNevWH1fkI/+CFqEh4denQ9d1k8Kl2DNNm753sc+LyYndkHxfQ/5hN6o0LMOGHXQe859g8upb3trHHU6ubF7wZC7edS6WqZHBMvgd84XtZf1b/jrrN1mpN6hPETGbyzIA==

so1ve avatar Aug 03 '23 10:08 so1ve

Reverting to 1.8.7 does not solve this problem :(

so1ve avatar Aug 03 '23 10:08 so1ve

For me it does but it intruduced Vue language server crashes so I reverted to 1.8.6 and everything seems to work fine now

KamilBeda avatar Aug 03 '23 11:08 KamilBeda

Interesting, when volar parses the code, the AST node of the second slot is totally lost!

so1ve avatar Sep 02 '23 16:09 so1ve

Opened https://github.com/vuejs/core/pull/11150, which may solve this issue.

kermanx avatar Jun 16 '24 14:06 kermanx

This one seems to be fixed

davidmatter avatar Aug 06 '24 07:08 davidmatter