@gabrielrufino/cube
Version:
Data structures made in Typescript
18 lines (17 loc) • 617 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var HashTableLinearProbingElement = /** @class */ (function () {
function HashTableLinearProbingElement(key, value) {
this.key = key;
this.value = value;
}
HashTableLinearProbingElement.prototype[Symbol.toPrimitive] = function (type) {
var options = {
string: "{ ".concat(this.key, " => ").concat(this.value, " }"),
number: 2,
};
return options[type] || null;
};
return HashTableLinearProbingElement;
}());
exports.default = HashTableLinearProbingElement;