dispose.js 901 B

12345678910111213141516171819202122232425262728
  1. function dispose_SuppressedError(r, e) {
  2. return "undefined" != typeof SuppressedError ? dispose_SuppressedError = SuppressedError : (dispose_SuppressedError = function dispose_SuppressedError(r, e) {
  3. this.suppressed = e, this.error = r, this.stack = Error().stack;
  4. }, dispose_SuppressedError.prototype = Object.create(Error.prototype, {
  5. constructor: {
  6. value: dispose_SuppressedError,
  7. writable: !0,
  8. configurable: !0
  9. }
  10. })), new dispose_SuppressedError(r, e);
  11. }
  12. function _dispose(r, e, s) {
  13. function next() {
  14. for (; r.length > 0;) try {
  15. var o = r.pop(),
  16. p = o.d.call(o.v);
  17. if (o.a) return Promise.resolve(p).then(next, err);
  18. } catch (r) {
  19. return err(r);
  20. }
  21. if (s) throw e;
  22. }
  23. function err(r) {
  24. return e = s ? new dispose_SuppressedError(e, r) : r, s = !0, next();
  25. }
  26. return next();
  27. }
  28. export { _dispose as default };