michaelolof / vuex-class-component

A Type Safe Vuex Module or Store Using ES6 Classes and ES7 Decorators written in TypeScript.
217 stars 21 forks source link

Change the namespace later to create an abstract store #111

Open Jupdi opened 2 years ago

Jupdi commented 2 years ago

Hi, I want to implement an abstract store because we have some stores that have actions and properties in common though our app. Therefore i created an abstract store class that has all properties and actions that are the same between all classes. Now I extend this class by the stores. But now i cannot extend my store implementations by the VuexModule class an therefore i cannot define the namespace. Is it possible to define the vuex module directly I my main store.ts where I normally would use extractVuexModule?

I can change some properties but not the internal path: const filterStoreModule = (extractVuexModule(FilterStore)) filterStoreModule.prototype.namespaced = true Thanks