Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typing modules added by plugin #46

Open
tobiasbeck opened this issue Apr 29, 2020 · 0 comments
Open

Typing modules added by plugin #46

tobiasbeck opened this issue Apr 29, 2020 · 0 comments

Comments

@tobiasbeck
Copy link

Hello I'm using the feathers-vuex Plugin for Vuex. To make it short how it works is that you define multiple plugins for your backend services and these plugins register namespaced modules which can communicate with the feathers backend service.
However since these modules are generated and registered inside a Plugin, I have no Idea how to enable them inside the direct-vuex store and also generate a Typing for them.
I defined my store the following way:

export const {
  store,
  rootActionContext,
  moduleActionContext,
  rootGetterContext,
  moduleGetterContext,
} = createDirectStore({
  strict: debug,
  state: {
    empty: true,
  },
  mutations,
  actions,
  modules: {
    desktop,
    audio,
    connectionStatus,
  },
  plugins: [
    ...servicePlugins,
    auth,
  ],
});

servicePlugins is a list of feathers-vuex plugins, which each register a namespaced module containing getters by using store.registerModule, mutations and actions. My custom defined modules which are defined by using direct-vuex defineModule method are mapped correctly, however the modules defined by the plugins are missing in direct-vuex getters and actions.
Is there a way to add these to direct-feathers to be able to have them types?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant