swc_ecma_compat_es2017::async_to_generatorFunction async_to_generator
source pub fn async_to_generator(c: Config, unresolved_mark: Mark) -> impl Pass
Expand description
@babel/plugin-transform-async-to-generator
async function foo() {
await bar();
}
§Out
var _async_to_generator = function (fn) {
...
};
var foo = _async_to_generator(function* () {
yield bar();
});