* Deletes a key from the current view, either by removing it outright in the * root layer or by recording a tombstone in child layers. * @param {K} item the item to delete * @returns {void}
(item)
| 76 | * @returns {void} |
| 77 | */ |
| 78 | delete(item) { |
| 79 | if (this.stack.length > 1) { |
| 80 | this.map.set(item, TOMBSTONE); |
| 81 | } else { |
| 82 | this.map.delete(item); |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Checks whether a key exists in the current scope chain, caching any parent |