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

Function resume

tslib.es6.mjs:234–234  ·  view source on GitHub ↗
(n, v)

Source from the content-addressed store, hash-verified

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); }
236 function fulfill(value) { resume("next", value); }
237 function reject(value) { resume("throw", value); }

Callers 4

verbFunction · 0.70
fulfillFunction · 0.70
rejectFunction · 0.70
settleFunction · 0.70

Calls 2

stepFunction · 0.70
settleFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…