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'm using version 1.0.0 with vue 3 and vuex 4. TS 4.1.6
When I'm direct-importing created store and trying to use it just like in documentation - everything is totally fine. But I want to register it in all components and use my store in methods using this.$store. When I try to do that I don't see any $store registered (but store was used by createApp().use(store) in index.ts). I don't know why but this code from global.d.ts doesn't work automatically:
This library does not provide typing of the global $store option.
In order to get your module with all types you either have to use Component Mapper or Composable Function or context
I'm using version 1.0.0 with vue 3 and vuex 4. TS 4.1.6
When I'm direct-importing created store and trying to use it just like in documentation - everything is totally fine. But I want to register it in all components and use my store in methods using
this.$store
. When I try to do that I don't see any $store registered (but store was used bycreateApp().use(store)
inindex.ts
). I don't know why but this code fromglobal.d.ts
doesn't work automatically:And even if I add this code manually in my store's
index.ts
, I don't get any typing inthis.$store
just because $store is Store<unknown>createComposable
works just fine but I don't like to usesetup()
everywhere...The text was updated successfully, but these errors were encountered: