UNPKG

1.2 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var tslib_1 = require("tslib");
4/**
5 * Thrown if custom repository inherits Repository class however entity is not set in @EntityRepository decorator.
6 */
7var CustomRepositoryCannotInheritRepositoryError = /** @class */ (function (_super) {
8 tslib_1.__extends(CustomRepositoryCannotInheritRepositoryError, _super);
9 function CustomRepositoryCannotInheritRepositoryError(repository) {
10 var _this = _super.call(this) || this;
11 _this.name = "CustomRepositoryCannotInheritRepositoryError";
12 Object.setPrototypeOf(_this, CustomRepositoryCannotInheritRepositoryError.prototype);
13 _this.message = "Custom entity repository " + (repository instanceof Function ? repository.name : repository.constructor.name) + " " +
14 " cannot inherit Repository class without entity being set in the @EntityRepository decorator.";
15 return _this;
16 }
17 return CustomRepositoryCannotInheritRepositoryError;
18}(Error));
19exports.CustomRepositoryCannotInheritRepositoryError = CustomRepositoryCannotInheritRepositoryError;
20
21//# sourceMappingURL=CustomRepositoryCannotInheritRepositoryError.js.map