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

Defining unknown properties as exist properties is wrong #12718

Closed
nagaraja0yellapu opened this issue Jul 29, 2022 · 3 comments
Closed

Defining unknown properties as exist properties is wrong #12718

nagaraja0yellapu opened this issue Jul 29, 2022 · 3 comments

Comments

@nagaraja0yellapu
Copy link

Version

2.7.8

Reproduction link

github.com

Steps to reproduce

This issue was created first in Vetur & later fixed in @vuejs/composition-api as below
vuejs/vetur#2505

vuejs/composition-api#609

Recently the same issue is created in Volar and closed mentioning common.ts definitions in vuejs/composition-api
vuejs/language-tools#1350

What is expected?

Error has to be displayed when unknown property or data in template (typescript code)

What is actually happening?

No error is displayed when unknown property or data in template (typescript code) due to
export type Data = { [key: string]: unknown }
in types/common.d.ts

@last-partizan
Copy link

Looks like i stumbled upon this exact same bug, and prepared different reproduction

https://github.com/last-partizan/volar-starter/tree/f512fc22f07155c69f8602f0d37a6745e338b949

I have three files:

  • src/HasErrorOk.vue - error detected with vue2 and vue3
  • src/ShoudBeErrorWithDataAndMethods.vue - error not detected with vue2, but detected with vue3
  • src/ShoudBeErrorWithEmptyDefineComponent.vue - error not detected with vue2 and vue3

@colinblaise
Copy link

Experiencing same issue. Major regression which is causing bugs to make it into production for us :(

@colinblaise
Copy link

colinblaise commented Aug 19, 2022

Can confirm that this is fixed in vue 2.7.9, thanks @yyx990803

Volar is still not showing any errors, but I assume we'll have to wait for a new version of Volar as well.

edit: Volar works for me now, I was just experiencing some weird caching issues after updating to vue 2.7.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants