-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
contribution welcomeThe team would welcome a contribution from the community for this issueThe team would welcome a contribution from the community for this issuetypescriptProblem related to TS typingsProblem related to TS typings
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 >'.
tinobino, igisev, luk9400, katsanost, rjurado01 and 2 more
Metadata
Metadata
Assignees
Labels
contribution welcomeThe team would welcome a contribution from the community for this issueThe team would welcome a contribution from the community for this issuetypescriptProblem related to TS typingsProblem related to TS typings