(key: K, callback: (key: K) => V)
| 91 | } |
| 92 | |
| 93 | getOrInsertComputed(key: K, callback: (key: K) => V): V { |
| 94 | if (this.cache.has(key)) { |
| 95 | this.updateKeyUsage(key) |
| 96 | return this.cache.get(key)! |
| 97 | } |
| 98 | const value = callback(key) |
| 99 | this.set(key, value) |
| 100 | return value |
| 101 | } |
| 102 | |
| 103 | [Symbol.iterator]() { |
| 104 | return this.cache[Symbol.iterator]() |
nothing calls this directly
no test coverage detected