(stream: StreamedMessage)
| 252 | } |
| 253 | |
| 254 | async function cancelStream(stream: StreamedMessage): Promise<void> { |
| 255 | const cancelable = stream as CancelableStream; |
| 256 | |
| 257 | try { |
| 258 | await cancelable.cancel?.(); |
| 259 | } catch {} |
| 260 | |
| 261 | try { |
| 262 | await cancelable.return?.(); |
| 263 | } catch {} |
| 264 | } |
| 265 | |
| 266 | async function throwIfAborted(signal?: AbortSignal, stream?: StreamedMessage): Promise<void> { |
| 267 | if (!signal?.aborted) { |
no test coverage detected