* Propagates an error through the stream
(error: Error)
| 97 | * Propagates an error through the stream |
| 98 | */ |
| 99 | error(error: Error): void { |
| 100 | if (this.isDone || this.terminalError) { |
| 101 | return |
| 102 | } |
| 103 | |
| 104 | this.terminalError = error |
| 105 | this.queue = [] |
| 106 | if (this.readReject) { |
| 107 | const reject = this.readReject |
| 108 | this.readResolve = undefined |
| 109 | this.readReject = undefined |
| 110 | reject(error) |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | /** |
| 115 | * Implements async iterator cleanup |
no outgoing calls
no test coverage detected