Skip to content

Instantly share code, notes, and snippets.

View jlucaspains's full-sized avatar

Lucas Pains jlucaspains

View GitHub Profile
@f-space
f-space / vuex-class-module.ts
Last active March 18, 2019 19:48
Decorators for class-style vuex modules.
import * as Vuex from 'vuex';
import 'reflect-metadata';
export const TypeSymbol = Symbol('type');
export interface IModule<R = any> {
readonly $state: any;
readonly $getters: any;
readonly $commit: Vuex.Commit;
readonly $dispatch: Vuex.Dispatch;