(index: number)
| 94 | } |
| 95 | |
| 96 | at(index: number): T | undefined { |
| 97 | if (index >= this._length || index < -this.length) { |
| 98 | return undefined |
| 99 | } |
| 100 | if (index < 0) { |
| 101 | return this._items[ |
| 102 | (this._head + this._length + index) % this._items.length |
| 103 | ] |
| 104 | } |
| 105 | return this._items[(this._head + index) % this._items.length] |
| 106 | } |
| 107 | |
| 108 | clear(): void { |
| 109 | this._items = repeated(undefined as T, this._defaultCapacity) |
no outgoing calls