(err: Error)
| 128 | } |
| 129 | |
| 130 | error(err: Error): void { |
| 131 | if (this.closed) return; |
| 132 | this.err = err; |
| 133 | this.closed = true; |
| 134 | while (this.waiters.length > 0) { |
| 135 | const w = this.waiters.shift()!; |
| 136 | w.reject(err); |
| 137 | } |
| 138 | this.wake(); |
| 139 | } |
| 140 | |
| 141 | [Symbol.asyncIterator](): AsyncIterator<T> { |
| 142 | return { |