victorgarciaesgi / vuex-typed-modules

🧰 A VueX wrapper to fully type your modules without boilerplate!
35 stars 8 forks source link

GettersTree definition #5

Closed koljada closed 4 years ago

koljada commented 4 years ago

Why does GettersTree<S> type have an optional state parameter? I think it should be mandatory. Ideally it should be compatible with the original Getter signature: export type Getter<S, R> = (state: S, getters: any, rootState: R, rootGetters: any) => any; It would be great to have an ability just to pass existed vuex-typed actions/getters/mutations to VuexModule .

victorgarciaesgi commented 4 years ago

Hi @koljada , you're right. I made custom GettersTree because I was trying to make a inferable interfaces to have typed Context, but it was impossible to infer all the context and names of mutations/actions and extending it at the same time!

I'm changing it back to Vuex types! :)

victorgarciaesgi commented 4 years ago

Fixed! Publishing it on 2.1.5