* Remove the item at logical `index`, shifting later elements. O(n) worst case. * Used only on rare abort-signal cancellation path.
(index)
| 111 | * Used only on rare abort-signal cancellation path. |
| 112 | */ |
| 113 | removeAt(index) { |
| 114 | if (index < 0 || index >= this.#size) return; |
| 115 | for (let i = index; i < this.#size - 1; i++) { |
| 116 | const from = (this.#head + i + 1) & this.#mask; |
| 117 | const to = (this.#head + i) & this.#mask; |
| 118 | this.#backing[to] = this.#backing[from]; |
| 119 | } |
| 120 | const last = (this.#head + this.#size - 1) & this.#mask; |
| 121 | this.#backing[last] = undefined; |
| 122 | this.#size--; |
| 123 | } |
| 124 | |
| 125 | /** |
| 126 | * Remove all items. O(n) for GC cleanup. |
no outgoing calls
no test coverage detected