mrcrowl / vuex-typex

Typescript builder for strongly-typed access to Vuex Store modules
MIT License
193 stars 22 forks source link

Fix return type of `dispatch` function #39

Closed libre-man closed 3 years ago

libre-man commented 3 years ago

Vuex checks if the returned type looks like a promise (i.e. has a callable then method) and in that case the value is returned as is. This means that if I return A which is PromiseLike (but not an actual promise) the return type should be A not Promise<A> as it is currently.