(item: T)
| 128 | } |
| 129 | |
| 130 | public add(item: T): boolean { |
| 131 | const i = this._size; |
| 132 | if (i >= this._queue.length) { |
| 133 | this.grow(); |
| 134 | } |
| 135 | this._size = i + 1; |
| 136 | if (i === 0) { |
| 137 | this._queue[0] = item; |
| 138 | } else { |
| 139 | this.siftup(i, item); |
| 140 | } |
| 141 | return true; |
| 142 | } |
| 143 | |
| 144 | public poll(): T | null { |
| 145 | if (this._size === 0) { |
no test coverage detected