DEV Community

Discussion on: Vuex + TypeScript

Collapse
 
tbhaxor profile image
Gurkirat Singh • Edited

I see you are using type intersection for example GetterTree<State, State> & Getters. I have a general dbt, why did you choose this way but not interfaces.

In interfaced you in extend the GetterTree<State, State> and then use it in the Getters part.

interface Getter extends GetterTree<State, State> {
 // data
}
Enter fullscreen mode Exit fullscreen mode