UNPKG

ravendb

Version:
36 lines 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IdTypeAndName = void 0; class IdTypeAndName { id; type; name; equals(o) { if (this === o) { return true; } if (!o || this.constructor !== o.constructor) { return false; } const that = o; if (this.id ? this.id === that.id : !!that.id) { return false; } if (this.type !== that.type) { return false; } return this.name ? this.name === that.name : !!that.name; } static create(id, type, name) { const idTypeAndName = new IdTypeAndName(); return Object.assign(idTypeAndName, { id, type, name }); } key() { return IdTypeAndName.keyFor(this.id, this.type, this.name); } static keyFor(id, type, name) { return `${id}.${type}.${name}`; } } exports.IdTypeAndName = IdTypeAndName; //# sourceMappingURL=IdTypeAndName.js.map