2👍
Isn’t this wrong and throwing syntax errors?
It should be:
export default {
MY_MUTATION_TYPE: 'MY_MUTATION_TYPE',
ANOTHER_MUTATION_TYPE: 'ANOTHER_MUTATION_TYPE',
}
That would make auto complete work.
- [Vuejs]-Set v-model value within a slot in Vuejs
- [Vuejs]-Changing style of element in Vue depending on true/false from element in api
0👍
Since you are doing default export, in your import you also should use default import syntax. In your case mutationTypes can be any name, so that’s why autocomplete will not work in the import. It will work on the object itself though:
To make it work in imports, you should use named exports.
Source:stackexchange.com