mrcrowl / vuex-typex

Typescript builder for strongly-typed access to Vuex Store modules
MIT License
193 stars 22 forks source link

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

Closed andreynazarov3 closed 5 years ago

andreynazarov3 commented 6 years ago

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

TotomInc commented 6 years ago

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.

mrcrowl commented 5 years ago

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.