vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.81k stars 394 forks source link

No errors in template with ts-check enabled in Vue >= 3.5.7 #4891

Closed twisterniq closed 2 weeks ago

twisterniq commented 2 weeks ago

Vue - Official extension or vue-tsc version

2.1.6

VSCode version

1.93.1

Vue version

3.5.9

TypeScript version

5.5.4

System Info

No response

package.json dependencies

{
  "name": "vuejs-ts-check-template-bug",
  "version": "0.0.0",
  "private": true,
  "type": "module",
  "dependencies": {
    "vue": "3.5.9"
  }
}

Steps to reproduce

  1. Clone the minimal reproduction.
  2. npm install
  3. Check that there are no errors in App.vue.
  4. If you downgrade to Vue 3.5.6 and check again, you will see that setDate has an error.

What is expected?

The errors in <template> should be shown when // @ts-check exists.

image

What is actually happening?

The errors in <template> are not shown when // @ts-check exists.

image

Link to minimal reproduction

https://github.com/twisterniq/vuejs-ts-check-template-bug

Any additional comments?

No response

twisterniq commented 2 weeks ago

It seems like it is caused by https://github.com/vuejs/core/pull/11644

I figured it out by installing the vue version from that commit. npm i https://pkg.pr.new/vuejs/core/vue@9eca65ee9871d1ac878755afa9a3eb1b02030350 (can reproduce the issue).

Then I installed the vue version from the commit before that one in the main branch: npm i https://pkg.pr.new/vuejs/core/vue@235ea4772ed2972914cf142da8b7ac1fb04f7585 (can't reproduce the issue).

Should I create the issue in https://github.com/vuejs/core?

KazariEX commented 2 weeks ago

Feel free to create it!