UNPKG

type-dexie

Version:

class oriented schema building tool for dexie.js

24 lines 967 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var entity_1 = require("../decorator/entity"); var not_an_entity_error_1 = require("../error/not-an-entity.error"); var not_a_constructor_error_1 = require("../error/not-a-constructor.error"); var Assert = /** @class */ (function () { function Assert() { } Assert.prototype.isConstructor = function (target, message) { if ('function' !== typeof target || !(target.prototype instanceof Object)) { throw new not_a_constructor_error_1.NotAConstructorError(message); } }; Assert.prototype.isEntity = function (target, message) { this.isConstructor(target, message); if (!entity_1.Entity.isEntity(target)) { throw new not_an_entity_error_1.NotAnEntityError(message); } }; return Assert; }()); var assert = new Assert(); exports.default = assert; //# sourceMappingURL=assert.js.map