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

Function next

tslib.es6.js:340–356  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

338 }
339 var r, s = 0;
340 function next() {
341 while (r = env.stack.pop()) {
342 try {
343 if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
344 if (r.dispose) {
345 var result = r.dispose.call(r.value);
346 if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
347 }
348 else s |= 1;
349 }
350 catch (e) {
351 fail(e);
352 }
353 }
354 if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
355 if (env.hasError) throw env.error;
356 }
357 return next();
358}
359

Callers 1

__disposeResourcesFunction · 0.70

Calls 1

failFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…