Check script which typechecks using Typescripts new Go port (#1075)

This commit is contained in:
Matt 2025-11-06 18:23:37 +00:00 • committed by GitHub
commit 11f04e1b0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -311,7 +311,10 @@ export class StreamableHTTPClientTransport implements Transport {
// if something happens reader will throw
try {
// Create a pipeline: binary stream -> text decoder -> SSE parser
const reader = stream.pipeThrough(new TextDecoderStream()).pipeThrough(new EventSourceParserStream()).getReader();
const reader = stream
.pipeThrough(new TextDecoderStream() as ReadableWritablePair<string, Uint8Array>)
.pipeThrough(new EventSourceParserStream())
.getReader();
while (true) {
const { value: event, done } = await reader.read();