How can I annotate my component to declare the type of my Store, such that my component doesn't give this.$store the type Vue.$store: Store<any>?
If you import vuex it is automatically declared in Vue constructor.
https://github.com/vuejs/vuex/blob/dev/types/vue.d.ts
https://github.com/vuejs/vuex/blob/dev/types/vue.d.ts lists $store as Store<any> and the question was how to annotate it to be Store<MyState>.
Anyone found a solution for this?
It would be great to fully type the store and then have auto-completion for this.$store (e.g. for this.$store.getters). Currently this.$store.getters has type any, which is not ideal.
solution is still needed...
Most helpful comment
https://github.com/vuejs/vuex/blob/dev/types/vue.d.ts lists
$storeasStore<any>and the question was how to annotate it to beStore<MyState>.