DEV Community

Discussion on: Vuex + TypeScript

 
jay_2ae6ad576a843f profile image
Yunjie Jia

Thank you!

I tried this method but seems like it will disable type check when I use

store.dispatch('moduleName/actionName') because I can pass any string and the compiler can compile successfully

type Namespaced = {

};
type NamespacedActions = Namespaced;

Thread Thread
 
harshgupta3 profile image
Harsh Gupta

no, it will give an error when you compile you can check my repo that I mentioned.