Defining unknown properties as exist properties is wrong

This issue has been created since 2022-07-29.

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
johnsoncodehk/volar#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 wrote this answer on 2022-08-15

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 wrote this answer on 2022-08-17

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

colinblaise wrote this answer on 2022-08-19

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

More Details About Repo
Owner Name vuejs
Repo Name vue
Full Name vuejs/vue
Language TypeScript
Created Date 2013-07-29
Updated Date 2022-09-27
Star Count 199644
Watcher Count 6098
Fork Count 32848
Issue Count 587

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Customize single cursor color 1 2022-08-01 2022-08-26
EA 下载加速有openwrt的方法吗? 9 2021-07-31 2022-08-25
account reconciliation 0 2022-05-06 2022-07-24
Railsconf 43: update t() in app/views/contact_types/edit.html.erb 1 2022-05-16 2022-05-16
Index.js,Main.js incomplete 1 2021-05-30 2022-09-19
Why I am not success to apply the react-router to my react project? 0 2021-06-07 2022-09-19
missing half of project 0 2021-05-12 2022-09-19
How can I run it on a local server? 7 2020-08-20 2022-09-19
Missing Slides: Jonathan Boccara "105 algorithms in less than an hour" 2 2019-05-18 2022-09-19
Missing Slides: Chandler Carruth "Spectre: Secrets, Side-Channels, Sandboxes, and Security" 1 2021-04-28 2022-09-19
storage: assertion failure in `offset_translator_state.cc` 11 2022-04-28 2022-08-10
Polybar crashes due to mpd. 2 2021-08-28 2022-07-20
add discussion on BO on combinatorial spaces 4 2021-10-10 2022-08-18
Serializing UUID not working with java 17 (but same works on java 11) 5 2021-09-28 2022-09-13
Unable to update Octopus v1 bootloader 3 2022-07-27 2022-09-26
Strace ftp-download-stress01-rmt.sh failed on x86 2 2021-07-06 2022-09-24
cgroup_regression_test.sh easily FAILs with "Device or resource busy" 7 2021-06-24 2022-07-31
total crash when trying to see a log 3 2022-08-04 2022-09-13
About manual annotations 2 2020-12-15 2022-09-20
Getting error "Cannot connect to amqp://guest:**@127.0.0.1:5672//" in Docker on Pretix 4.4 image 2 2021-11-09 2022-09-04
Fix broken links 3 2020-11-25 2022-01-17
Gr2m patch revert 0 2021-05-17 2022-01-22
[BUG] Overflow in Sidebar with Centreralized Theme 1 2021-12-09 2022-08-27
Reinstate the 'missing-type-doc' lint rule 4 2021-11-26 2022-09-04
What does it take for a package to be updateable 7 2021-06-21 2022-09-10
Toolkit components should display correctly within grids 1 2022-06-13 2022-09-21
[en] spelling issu not found 2 2021-12-29 2022-08-07
TypeScript error when mixing types in data 4 2021-11-11 2022-09-19
update elliptic to 6.5.3 0 2020-09-07 2022-09-20
Task list items rendered HTML doesn't look right 1 2021-11-10 2022-01-23
[package] libusb/1.0.26: lib folder not exported in package for RelWithDebInfo 1 2022-07-27 2022-09-19
TypeError [ERR_INVALID_ARG_TYPE]: The 'request' argument must be string. Received type undefined 7 2021-11-18 2022-09-04
Slow response on AQARA B1 after hours of inoperation 3 2021-12-09 2022-06-30
Critical vulnerabilities go 3 2022-07-20 2022-09-18
KCD 2022 Paris, France 11 2021-08-13 2022-09-19
Kubernetes Community Days, Bengaluru'22 12 2021-09-20 2022-08-26
[Bug]: grimler.se repository fails with "The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B0076E490B71616B" 1 2021-12-14 2022-09-16
update text from 8198? 0 2021-01-06 2022-08-10
Sometimes <Link>'s don't work in dev 8 2018-11-29 2022-01-24
Delete database from the open list 2 2022-05-10 2022-08-09
Autofill does not work in Samsung Internet Browser 1 2022-04-05 2022-08-09
runes: pname restrictions fail if the parameter has an underscore 0 2022-08-21 2022-09-18
Android Basics: Coroutines 1 2021-08-29 2022-09-10
Improve logging on edits; so when monitoring, we can see which edits have been processed. 0 2021-11-24 2022-07-15
The dependencie version is not updated in the README page 0 2021-11-25 2022-09-18
DYNAMIC_FILTER switch disappears on the Configuration tab after upgrading to BF 4.3 2 2022-01-29 2022-09-16
Performance chapter on the site 2 2021-07-02 2022-09-04
--match should consider only basename when given a path argument 2 2021-08-13 2022-09-13
Reset View Locations: Does not reset NPM Scripts and Timeline order 2 2022-01-25 2022-09-05
Hide Python walkthrough when on github.dev 0 2021-10-06 2022-09-27