You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(1) In the template of App.vue I use the property 'test' in the click handler of the image. When setting it to a value on click, I should get an error during runtime (and preferably also during compilation, since such an error wouldn't show up when the component isn't enabled which can lead to bugs only found at runtime. That is a problem correct usage of TypeScript could solve).
(2) I also use the property 'test2' in my template, which gives an error, during runtime. Though I would also expect this error during compilation.
What is actually happening?
(1) In the first example I would expect to get an error both during runtime and compilation. I get no error at all right now (when setting a value in a click handler, instead calling a method would invoke an error, during runtime, if that method didn't exist on the component).
(2) In the second example I would expect an error during compilation as well, which I don't get.
Autocompletion in IDEs (e.g. Intellij / Webstorm) using TypeScript also isn't that great yet, as it doesn't seem to recognize that the template belongs to the class, but that is probably a different issue.
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Let's keep the progress of this at one place at vuejs/vetur#209 🙂
to have ts check this, we would need to add some specific behaviour or plugin to typescript but not much in Vue
Version
2.5.17
Reproduction link
https://github.com/RobbinBaauw/vue-ts
Steps to reproduce
What is expected?
(1) In the template of App.vue I use the property 'test' in the click handler of the image. When setting it to a value on click, I should get an error during runtime (and preferably also during compilation, since such an error wouldn't show up when the component isn't enabled which can lead to bugs only found at runtime. That is a problem correct usage of TypeScript could solve).
(2) I also use the property 'test2' in my template, which gives an error, during runtime. Though I would also expect this error during compilation.
What is actually happening?
(1) In the first example I would expect to get an error both during runtime and compilation. I get no error at all right now (when setting a value in a click handler, instead calling a method would invoke an error, during runtime, if that method didn't exist on the component).
(2) In the second example I would expect an error during compilation as well, which I don't get.
These issues might be related, not sure:
Autocompletion in IDEs (e.g. Intellij / Webstorm) using TypeScript also isn't that great yet, as it doesn't seem to recognize that the template belongs to the class, but that is probably a different issue.
Thanks in advance!
The text was updated successfully, but these errors were encountered: