Open tolmasky opened 9 years ago
I've been meaning to update https://www.npmjs.com/package/es7-async-await to behave more like Regenerator (i.e. do everything but transpile generators). That transform will still create a GeneratorFunction for each async function call, though, when all you really need is a single generator object.
Standards-wise, it seems like await + yield is heading in the direction of AsyncIterator, which is something Regenerator supports but es7-async-await does not (yet).
If we didn't have to deal with both await and yield, then we wouldn't need the AwaitArgument wrapper. I think the future has a place for both, though, so I'm reluctant to forbid yield just yet.
I'm now operating under an environment that supports generators out of the box. I'd still like to convert my async functions however. Babel has asyncToGenerator for this, but that seems to behave pretty differently than regeneratorRuntime.async() (no AwaitArgument, etc). So...