UNPKG

@baizey/dependency-injection

Version:
42 lines (41 loc) 1.8 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.CollectionDependencyError = void 0; var types_1 = require("./types"); var CollectionDependencyError = /** @class */ (function (_super) { __extends(CollectionDependencyError, _super); function CollectionDependencyError(errors) { var _this = _super.call(this, "Several dependency errors has occured, tl;dr:\n".concat(errors.map(function (e) { return e.message; }).join('\n'))) || this; Object.defineProperty(_this, "type", { enumerable: true, configurable: true, writable: true, value: types_1.DependencyErrorType.Collection }); Object.defineProperty(_this, "errors", { enumerable: true, configurable: true, writable: true, value: void 0 }); _this.errors = errors; return _this; } return CollectionDependencyError; }(Error)); exports.CollectionDependencyError = CollectionDependencyError;