UNPKG

@gabrielrufino/cube

Version:

Data structures made in Typescript

19 lines (18 loc) 656 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var HashTableSeparateChainingElement = /** @class */ (function () { function HashTableSeparateChainingElement(key, value) { this.key = key; this.value = value; } HashTableSeparateChainingElement.prototype[Symbol.toPrimitive] = function (type) { var primitives = { default: true, number: 2, string: "{ ".concat(this.key, " => ").concat(this.value, "}"), }; return primitives[type]; }; return HashTableSeparateChainingElement; }()); exports.default = HashTableSeparateChainingElement;