* Stores a value at the node identified by the provided tuple key. * @param {[...K, V]} args tuple * @returns {void}
(...args)
| 73 | * @returns {void} |
| 74 | */ |
| 75 | set(...args) { |
| 76 | /** @type {WeakTupleMap<K, V>} */ |
| 77 | let node = this; |
| 78 | for (let i = 0; i < args.length - 1; i++) { |
| 79 | node = node._get(/** @type {ArrayElement<K>} */ (args[i])); |
| 80 | } |
| 81 | node._setValue(/** @type {V} */ (args[args.length - 1])); |
| 82 | } |
| 83 | |
| 84 | /** |
| 85 | * Checks whether the exact tuple key has a stored value. |
no test coverage detected