mrcrowl / vuex-typex

Typescript builder for strongly-typed access to Vuex Store modules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to access other modules 'commit' and 'dispatch' methods.

andreynazarov3 opened this issue · comments

I don't see any examples of how to access other modules' 'commit' and 'dispatch' methods. What is a proper way of doing it?

I'm looking for the same thing, but I think the best way to do it is wait for Vue 3.0 which will have an internal, full TypeScript API.

Once done, Vuex will update its API with TypeScript to allow us to do full type-safe store without using hacky third-party modules.

Currently, I achieve access to other modules by importing the other module and calling its methods directly.

I could provide an example if this doesn't make sense.