()
| 118 | } |
| 119 | |
| 120 | close(): void { |
| 121 | if (this.closed) return; |
| 122 | this.closed = true; |
| 123 | while (this.waiters.length > 0) { |
| 124 | const w = this.waiters.shift()!; |
| 125 | w.resolve({ value: undefined as unknown as T, done: true }); |
| 126 | } |
| 127 | this.wake(); |
| 128 | } |
| 129 | |
| 130 | error(err: Error): void { |
| 131 | if (this.closed) return; |
no test coverage detected