aggregate-error.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. var __create = Object.create;
  2. var __defProp = Object.defineProperty;
  3. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  4. var __getOwnPropNames = Object.getOwnPropertyNames;
  5. var __getProtoOf = Object.getPrototypeOf;
  6. var __hasOwnProp = Object.prototype.hasOwnProperty;
  7. var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  8. var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
  9. var __export = (target, all) => {
  10. __markAsModule(target);
  11. for (var name in all)
  12. __defProp(target, name, { get: all[name], enumerable: true });
  13. };
  14. var __reExport = (target, module2, desc) => {
  15. if (module2 && typeof module2 === "object" || typeof module2 === "function") {
  16. for (let key of __getOwnPropNames(module2))
  17. if (!__hasOwnProp.call(target, key) && key !== "default")
  18. __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
  19. }
  20. return target;
  21. };
  22. var __toModule = (module2) => {
  23. return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
  24. };
  25. var __publicField = (obj, key, value) => {
  26. __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
  27. return value;
  28. };
  29. __export(exports, {
  30. default: () => aggregate_error_default
  31. });
  32. var import_base_error = __toModule(require("./base-error"));
  33. class AggregateError extends import_base_error.default {
  34. constructor(errors) {
  35. super();
  36. __publicField(this, "errors");
  37. this.errors = errors;
  38. this.name = "AggregateError";
  39. }
  40. toString() {
  41. const message = `AggregateError of:
  42. ${this.errors.map((error) => error === this ? "[Circular AggregateError]" : error instanceof AggregateError ? String(error).replace(/\n$/, "").replace(/^/gm, " ") : String(error).replace(/^/gm, " ").substring(2)).join("\n")}
  43. `;
  44. return message;
  45. }
  46. }
  47. var aggregate_error_default = AggregateError;
  48. //# sourceMappingURL=aggregate-error.js.map