()
| 9 | } |
| 10 | |
| 11 | async next(): Promise<T> { |
| 12 | if (this.queue.length > 0) return this.queue.shift()! |
| 13 | return new Promise((resolve) => this.resolvers.push(resolve)) |
| 14 | } |
| 15 | |
| 16 | async *[Symbol.asyncIterator]() { |
| 17 | while (true) yield await this.next() |
no test coverage detected