-
Notifications
You must be signed in to change notification settings - Fork 114
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
Improving Vuex Store typings #36
base: master
Are you sure you want to change the base?
Conversation
@qm3ster could you review? |
what about adopt decorators for store https://github.com/championswimmer/vuex-module-decorators ? It has very friendly syntax and strong typing/autocomplete inside IDE. |
Vue developers themselves decided to not officially support classes and decorators, decorators being still unstable API in TS, if I'm not mistaken. Also, there's no reason why the object API wouldn't provide autocomplete inside IDE, or wouldn't be strongly typed. I also prefer the purely functional and object literal approach... |
Seems a bit old now, is it still relevant? |
@atinux I was going to close this PR and another issue #37 when the new Vuex comes and this template could deliver an appropriate approach for typing of Vuex. The current template is not providing any appropriate approach to give consistent typedefs between pages and store. And I'm expecting the next Vuex gives an official-ish way for that. |
Alright, letting you handle it @hmsk thank you! |
Since TS primary feature is typings support I think it would be great to showcase how Vuex store can be properly typed inside a template