vetur
vetur copied to clipboard
Intellisense not work if the component doesn't have any of data, computed, methods (mirror of #838)
- [x] I have searched through existing issues
- [x] I have read through docs
- [x] I have read FAQ
- [x] I have tried restarting VS Code or running
Vetur: Restart VLS
Info
- Platform: Linux
- Vetur version: v0.35.0
- VS Code version: 1.66.2
- Vue 2.6.14
Problem
Currently, when working with Vetur from VS Code when I want to use a function to calculate part of the returned data Vetur doesn't know about the defined methods. Same thing when doing computed, have not checked watchers but it is safe to assume that won't work either.

Reproducible Case
<template>
<div>
{{ getValue(value) }}
</div>
</template>
<script type="ts">
import Vue, { PropType } from 'vue'
export default Vue.extend({
props: {
value: { type: String, default: '' },
},
data() {
return {
uppercased: this.getUpperCasedValue(),
}
},
methods: {
getUpperCasedValue() {
return this.value.toUpperCase()
},
getValue() {
return this.uppercased
},
}
})
</script>
Having the same issue as well...
Please check this guide. https://vuejs.github.io/vetur/guide/FAQ.html#property-xxx-does-not-exist-on-type-combinedvueinstance
does not work neither