DEV Community

Discussion on: Vuex + TypeScript

Collapse
 
soerenmartius profile image
Sören Martius

Hey Andrew, thanks for this great example. I am currently stuck in the process of typing getters, rootState, and rootGetters in actions and getters. Any chance that you can share an example? I guess the AugmentedActionContext and Store type definitions is what I am looking for.

Thank You

Collapse
 
soerenmartius profile image
Sören Martius

As a reference, I've uploaded a gist here: gist.github.com/soerenmartius/5f69...

The code works but typescript is unable to resolve the getters properly. Any help will be highly appreciated