ClickerMonkey / vuex-typescript-interface

Adding magical type safety to Vuex without additional code
MIT License
44 stars 4 forks source link

Should vue and vuex be defined as peer dependencies? #10

Open anteprimorac opened 4 years ago

anteprimorac commented 4 years ago

Currently, a project using this package is locked to use vue and vuex versions defined in this package.

DataTables commented 4 years ago

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.

ClickerMonkey commented 3 years ago

@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.