Repository navigation
Improving Vuex Store typings - #36
AndrewBogdanovTSS wants to merge 4 commits into
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! |
|
thanks for this, and sorry it never landed 🙏 this template was built for Nuxt 2, which reached end of life in June 2024, so we're archiving this repo and closing out open PRs. |
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