3.0.0-rc.3
https://github.com/eladcandroid/vue-cli-errors
Create a new project with typescript and linter support
Install axios plugin with "vue ui"
Try to use this.$axios in HelloWorld.vue
No errors
Got a lint error - Property '$axios' does not exist on type 'HelloWorld'
(Less important but also got warning errors about semi-colons)
That's an issue in the axios plugin, which isn't maintained by us. It needs to account for type shims when used with typescript.
@eladcandroid You've probably already solved this but for anyone else who stumbles across this issue you may need to add this shim to get Axios types against this.$axios
.
import axios from 'axios';
declare module 'vue/types/vue' {
interface Vue {
$axios: typeof axios
}
}
@Robula do you know how to do it for Store
?
Property '$axios' does not exist on type 'Store<any>'
Most helpful comment
@eladcandroid You've probably already solved this but for anyone else who stumbles across this issue you may need to add this shim to get Axios types against
this.$axios
.