Decorators for compatability with vuex-module-decorators
See original GitHub issueWould be great if we could do things like:
@Module
export default class Collection extends VuexModule {
documents = [];
@FirestoreAction
bindCollection({ context }, name: string) {
context.bindFirestoreRef('documents', db.collection(name));
context.unbindFirestoreRef('documents');
}
}
Would allow actions and state to be more true to how they look in Vanilla Vuex while also making them typesafe.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
championswimmer/vuex-module-decorators - GitHub
TypeScript/ES7 Decorators to create Vuex modules declaratively - GitHub ... There are major usage improvements (non backwards compatible) in 0.8.0.
Read more >vuex-module-decorators - npm
Decorators to make class-like Vuex modules. Latest version: 2.0.0, last published: a year ago. Start using vuex-module-decorators in your ...
Read more >Typescript/ES7 Decorators to make Vuex modules a breeze
Today I would like to show you a very useful tool written in TypeScript that can boost your productivity with Vuex: vuex-module-decorators.
Read more >Getting Started | vuex-module-decorators - championswimmer
In your store, you use the MyModule class itself as a module. import Vuex from 'vuex' import MyModule from '~/store/mymodule' ...
Read more >vuex-module-decorators versions and peer dependencies
Online Peer dependency version tool to search for compatible versions of related NPM packages.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Now that I think about it, I agree - it doesn’t belong in this package. I wrote a very simple vuexfire-decorators as a separate package. I’ll release it as soon as it’s hardened.
when combined with
vuex-module-decorators
and typescript, your todo example (as a module) looks like:Closing as decorators for vue in terms of typings are being deprecated and there hasn’t been any activity.
If anybody publishes a lib, feel free to post it here