()
| 1121 | } |
| 1122 | |
| 1123 | next(): Promise<IteratorResult<T>> { |
| 1124 | this.refill(); |
| 1125 | // This shift will never throw an error because the buffer is always |
| 1126 | // full after a refill. If the stream is exhausted, the buffer will be |
| 1127 | // full of Promises that will resolve to the end-of-stream signal. |
| 1128 | return this.buffer.shift(); |
| 1129 | } |
| 1130 | } |
| 1131 | |
| 1132 | /** |