Closed trinopoty closed 5 years ago
Hi! Add somewhere at app initialisation to make it work globally
ResourceGlobalConfig.returnAs = ResourceActionReturnType.Promise
Suggest to put that in app.component
constructor
But this is still a bug.
returnAs
should not be overriding IResourceMethodPromiseStrict
.
If I specified a IResourceMethodPromiseStrict
, it should return a promise and not anything else.
IResourceMethodPromiseStrict
is just an Interface which is used in order to tell your IDE that it should return promise
I see.
I recently updated to the latest version of the library and noticed this issue. I've changed all my
IResourceMethodStrict
toIResourceMethodPromiseStrict
but it returns an Observable instead of a Promise. As such, I'm getting errors like.then is not a function
.