(id: NodeID)
| 21 | else this.map.set(id, {node, refs: 1}) |
| 22 | } |
| 23 | removeRef(id: NodeID) { |
| 24 | const entry = this.map.get(id) |
| 25 | if (entry) { |
| 26 | entry.refs-- |
| 27 | if (entry.refs === 0) { |
| 28 | this.map.delete(id) |
| 29 | } |
| 30 | } |
| 31 | } |
| 32 | clear() { |
| 33 | this.map.clear() |
| 34 | } |
no test coverage detected