You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I feel like it should be possible to override this with store?: Store<MyState> and $store: Store<MyState> to allow this.$store etc. on the Vue instance to be fully typed.
What is actually happening?
You can't redeclare an interface property, so trying to do so will result in a TypeScript error.
It feels like if you go to all the effort of fully typing out your whole vuex store it's rendered pretty much useless if your app makes heavy use of this.$store.state.foo. This is especially an issue for me because I use nuxt and do a lot with $store in the asyncData functions. I've searched around for a fix or a workaround but not come up with much. Is there something I am missing here?
The text was updated successfully, but these errors were encountered:
Version
3.0.1
Reproduction link
https://github.com/vuejs/vuex/blob/dev/types/vue.d.ts
Steps to reproduce
types/vue.d.ts
contains the followingWhat is expected?
I feel like it should be possible to override this with
store?: Store<MyState>
and$store: Store<MyState>
to allowthis.$store
etc. on the Vue instance to be fully typed.What is actually happening?
You can't redeclare an interface property, so trying to do so will result in a TypeScript error.
It feels like if you go to all the effort of fully typing out your whole vuex store it's rendered pretty much useless if your app makes heavy use of
this.$store.state.foo
. This is especially an issue for me because I use nuxt and do a lot with$store
in theasyncData
functions. I've searched around for a fix or a workaround but not come up with much. Is there something I am missing here?The text was updated successfully, but these errors were encountered: