Closed bodograumann closed 5 years ago
Hmm, I'm not convinced:
@gertqin
I was only trying to convert my existing code to use vuex-class-modules. As @c01nd01r has pointed out, vuex allows returning values and defining actions as synchronous functions. So that’s what I did ^^
Looking more closely at my code, I now see, that I don‘t actually use the returned value. Furthermore the question of (a)synchronous methods came up because I am calling rxjs
methods, which return Observables
and I felt reluctant to call toPromise
everywhere.
So now I’m converting all my Observable
s to Promise
s and using then
instead of subscribe
, but in the future I might want to do more with the Observables
and I don’t know whether this is even possible with the vuex api.
Alright, as the official Vue typings allow return type any
for actions, I will change the typings to that too.
You define the type of an action method as
TypedPropertyDescriptor<(arg?: any) => Promise<void>>'
. I think there should be more options.Promise<any>
.