586
return;
587
}
589
>
const next = item.next;
590
>
const previous = item.previous;
591
>
592
>
// Unlink the item.
593
>
if (item === this._head) {
594
// next must be defined since item was not tail but is head
595
// So there are more than on item in the map
596
next!.previous = undefined;
597
this._head = next;
599
// Both next and previous are not undefined since item was neither head nor tail.
600
next!.previous = previous;
601
previous!.next = next;
602
}
603
>
item.next = undefined;
map.ts
604
>
item.previous = this._tail;
605
>
this._tail.next = item;
606
>
this._tail = item;
607
>
this._state++;
608
>
}
609
}
610