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

Way to shim direct store type with specific module #71

Open
lyle45 opened this issue Apr 21, 2021 · 0 comments
Open

Way to shim direct store type with specific module #71

lyle45 opened this issue Apr 21, 2021 · 0 comments

Comments

@lyle45
Copy link

lyle45 commented Apr 21, 2021

Is there a way to shim direct store type with specific module?

use case, sharing modules through Lerna monorepo structure there's no way to know which store instance will be used when using the direct store. When one for example created a composition hook for accessing a shared module, hook gets store instance from caller vue instance, he needs to know to know the direct module types without accessing store instance

e.g.

export function useAuthStore() {
  const vm = getCurrentInstance().proxy
  const store: DirectStoreTypeWithAuthModuleOnly = vm.$store.direct
}
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