Skip to content
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

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

Closed
twisterniq opened this issue Sep 27, 2024 · 2 comments · Fixed by #12073
Closed

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

twisterniq opened this issue Sep 27, 2024 · 2 comments · Fixed by #12073
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope: types

Comments

@twisterniq
Copy link

twisterniq commented Sep 27, 2024

Vue version

3.5.9

Link to minimal reproduction

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

Steps to reproduce

  1. Clone the minimal reproduction.
  2. Run 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

System Info

No response

Any additional comments?

As I reported in vuejs/language-tools#4891:

It seems like it is caused by #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).

@yyx990803
Copy link
Member

/cc @KazariEX

@yyx990803 yyx990803 added the 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. label Sep 29, 2024
@KazariEX
Copy link
Contributor

KazariEX commented Sep 29, 2024

In JS, the default type for TypeProps is ↓ which is different from the performance under TS.

image

image

image

image

@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope: types
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants