MCPcopy Create free account
hub / github.com/microsoft/tslib / awaitReturn

Function awaitReturn

tslib.es6.mjs:232–232  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

230 var g = generator.apply(thisArg, _arguments || []), i, q = [];
231 return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
232 function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
233 function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
234 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
235 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…