(key: K)
| 27 | } |
| 28 | |
| 29 | delete(key: K) { |
| 30 | const result = this.cache.delete(key) |
| 31 | if (result) { |
| 32 | const index = this.keysInUse.indexOf(key) |
| 33 | if (index !== -1) { |
| 34 | this.keysInUse.splice(index, 1) |
| 35 | } |
| 36 | } |
| 37 | return result |
| 38 | } |
| 39 | |
| 40 | private updateKeyUsage(key: K) { |
| 41 | const index = this.keysInUse.indexOf(key) |
no outgoing calls
no test coverage detected