()
| 328 | } |
| 329 | |
| 330 | shift(): V | undefined { |
| 331 | if (!this._head && !this._tail) { |
| 332 | return undefined; |
| 333 | } |
| 334 | if (!this._head || !this._tail) { |
| 335 | throw new Error('Invalid list'); |
| 336 | } |
| 337 | const item = this._head; |
| 338 | this._map.delete(item.key); |
| 339 | this.removeItem(item); |
| 340 | this._size--; |
| 341 | return item.value; |
| 342 | } |
| 343 | |
| 344 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 345 | forEach(callbackfn: (value: V, key: K, map: LinkedMap<K, V>) => void, thisArg?: any): void { |
no test coverage detected