Open
Description
Version
4.0.2
Reproduction link
https://codesandbox.io/s/competent-architecture-4ezib?file=/src/App.vue
Steps to reproduce
import {defineComponent, ref} from 'vue'
export default defineComponent({
beforeRouteEnter(to, from, next) {
next(vm => {
vm.customVariable = 'changed text'
^^^ TS2339: Property 'customVariable' does not exist on type 'ComponentPublicInstance{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase >'.
})
},
setup() {
const customVariable = ref('')
return {
customVariable
}
}
})
What is expected?
returns correct instance variables
What is actually happening?
Property 'customVariable' does not exist on type 'ComponentPublicInstance{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase >'.