[Vue + Typescript] Property does not exist on type 'Function'. #8163
Replies: 5 comments
-
This is an expected outcome. It can't be considered a bug. |
Beta Was this translation helpful? Give feedback.
-
@RicardoErii Ohh, my bad. But then, as in this example, how can i get the expected outcome? As in, set another data property "selectedOne" as "this.metadata.options[0]"? |
Beta Was this translation helpful? Give feedback.
-
Maybe you can use it this way.
|
Beta Was this translation helpful? Give feedback.
-
Ok thnx @RicardoErii , will try this out. But if i want to access those properties, from outside, say from the template, how can i do that? |
Beta Was this translation helpful? Give feedback.
-
ohh,You can use it normally. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Vue version
3.2.47
Link to minimal reproduction
https://play.vuejs.org/#eNptkLFqwzAQhl/lx4sTCE67GjdQuha6dIs6iPjSiMonYZ9Di9C7V3Lj2kMW6T7p+4/jQvHsfXUdqaiLZjj1xgus5s8nVcigioNi03nXCwJaOhumF5eYiQUR5951KFO4VKyYvicxaXq0073WN0Ex0GrRmy2mGuhJxp5nAjoSnY16eQKcF+N4qHFc3oDAuqMa5bvjn3KHq7ZjRskYd/fMV/dlVqbNGBfxYy6X9ECWTkLtG6eAXMxQzQNWt6GOD7fY1CgdcZsLxc3+b5dpfwmEOm+1UCKguTweQlg3r/KEiLHZp6+c/feL+AtUe4Zu
Steps to reproduce
In options api, with defineComponent define data properties, and in the same properties, try to access other data properties. It will throw error saying:
Here is the code:
What is expected?
No error is expected
What is actually happening?
Property "options" doesn't exist on type 'Function'.
=> this error is comingSystem Info
Beta Was this translation helpful? Give feedback.
All reactions