vuex-typescript-interface
vuex-typescript-interface copied to clipboard
Should vue and vuex be defined as peer dependencies?
Currently, a project using this package is locked to use vue and vuex versions defined in this package.
I'm finding that I need to use store: store as any
due to this issue as well (#3 is related). Since vuex
is installed alongside vuex-typescript-interface
I'm getting a TypeScript error for the alignment of the store
parameter. Delete vuex
from node_modules
and it works fine for typing, but since Vuex isn't in the node modules, compile fails.
@anteprimorac That's true - it's a challenge to do peer dependency because you could pull in a new version of vuex that has features not supported by this library. If I do a peer dependency the Vuex types may interfere with the types specified in this project. I'll investigate for the next version of this library with Vuex 4.