UNPKG

typeorm

Version:

Data-Mapper ORM for TypeScript, ES7, ES6, ES5. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, MongoDB databases.

38 lines (36 loc) 1.01 kB
/** */ var Alias = /** @class */ (function () { function Alias(alias) { Object.assign(this, alias || {}); } Object.defineProperty(Alias.prototype, "target", { get: function () { return this.metadata.target; }, enumerable: true, configurable: true }); Object.defineProperty(Alias.prototype, "hasMetadata", { get: function () { return !!this._metadata; }, enumerable: true, configurable: true }); Object.defineProperty(Alias.prototype, "metadata", { get: function () { if (!this._metadata) throw new Error("Cannot get entity metadata for the given alias \"" + this.name + "\""); return this._metadata; }, set: function (metadata) { this._metadata = metadata; }, enumerable: true, configurable: true }); return Alias; }()); export { Alias }; //# sourceMappingURL=Alias.js.map