MCPcopy Create free account
hub / github.com/microsoft/SandDance / _asyncToGenerator

Function _asyncToGenerator

docs/app/js/sanddance-app.js:53472–53486  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

53470 else Promise.resolve(value).then(_next, _throw);
53471}
53472function _asyncToGenerator(fn) {
53473 return function() {
53474 var self = this, args = arguments;
53475 return new Promise(function(resolve, reject) {
53476 var gen = fn.apply(self, args);
53477 function _next(value) {
53478 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
53479 }
53480 function _throw(err) {
53481 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
53482 }
53483 _next(undefined);
53484 });
53485 };
53486}
53487exports.default = _asyncToGenerator;
53488
53489},{"@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"3owyr":[function(require,module,exports) {

Callers

nothing calls this directly

Calls 1

_nextFunction · 0.70

Tested by

no test coverage detected