"use strict"; var User = (function () { function User(id, name, cardId, role) { this.id = id; this.name = name; this.card = cardId; this.role = role; } User.prototype.equals = function (other) { if (other) { var keySet1 = Object.keys(this); var keySet2 = Object.keys(other); var j = 0; var isTheSame = true; for (j; j < keySet1.length; j++) { if (this[keySet1[j]] !== other[keySet2[j]]) { // Shit is not the same isTheSame = false; } } return isTheSame; } return false; }; User.toUser = function (r) { var user = new User(r.ID, r.NAME, r.CARD_ID, r.ROLE); //console.log('Parsed user:', user); return user; }; return User; }()); exports.User = User; //# sourceMappingURL=user.class.js.map