ktsn / vuex-class

Binding helpers for Vuex and vue-class-component
MIT License
1.73k stars 86 forks source link

Helper file #42

Closed mailok closed 5 years ago

mailok commented 5 years ago

Why can not I use the decorators in a file that is not a component? I write that in my helper.ts

@Getter(GetterType.ERROR) getterError;

but show me error. i what export getterError captura

ktsn commented 5 years ago

Decorator cannot be used by such usage. You need to use it with class declaration, method, accessor or property. https://www.typescriptlang.org/docs/handbook/decorators.html