@asyncAction with ES6 (not TypeScript)
d4rky-pl opened this issue · 3 comments
d4rky-pl commented
It seems that generator functions do not work with decorators.
I've tried using @asynAction something = function*() {}
but it does not seem to work properly.
The easiest workaround so far seems to be:
class Foo {
fetch = asyncAction(function* fetch() {
// ... code ...
})
}
It might be a good idea to add this to README :) I can send a PR if you agree.
mweststrate commented
@d4rky-pl agreed :)
jshaker commented
Why not just call a regular action within an async function?
d4rky-pl commented
@mweststrate This will take a bit longer, I'm afraid. The comments in code are not always valid JSDOC so every time documentation is regenerated, there are some things missing, some broken etc. I will dig into it when I have more spare time :)