Check script which typechecks using Typescripts new Go port (#1075)
This commit is contained in:
parent
9757ace06e
commit
11f04e1b0b
1 changed files with 133 additions and 10 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue