* @param {unknown} key * @returns {unknown}
(key)
| 26 | * @returns {unknown} |
| 27 | */ |
| 28 | get(key) { |
| 29 | if (!this.cache.has(key)) { |
| 30 | return undefined; |
| 31 | } |
| 32 | // Move accessed item to the end (most recently used) |
| 33 | const value = this.cache.get(key); |
| 34 | this.cache.delete(key); |
| 35 | this.cache.set(key, value); |
| 36 | return value; |
| 37 | } |
| 38 | |
| 39 | /** |
| 40 | * @param {unknown} key |
no test coverage detected