-
-
Notifications
You must be signed in to change notification settings - Fork 595
Open
Labels
Description
- [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: Win
- Vetur version: 0.31.3
- VS Code version: 1.52.1
Problem
I try to import a mutation with the method ...mapMutations. If this is the only method in my vue file can use it without any warning. I have this in my script section:
methods: {
...mapMutations(['increment'])
}
and this in my template section:
<button @click="increment">X</button>
But if I add another method which is independent from my initial method:
methods: {
method2() {
console.log('method2')
},
...mapMutations(['increment'])
}
I get the following error in my template:
Property 'increment' does not exist on type 'CombinedVueInstance<{ method2(): void; } & Record<never, any> & Vue, object, object, object, Record<never, any>>'.
The vue app is still working, I only get the error in vscode.
Reproducible Case
I did a minimal example starting from vue hello world:
https://github.com/ntraut/vue-hello-world