File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 1
1
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
2
2
3
+ import { TransformStream } from "stream/web" ;
4
+
3
5
interface TextLineStreamOptions {
4
6
/** Allow splitting by solo \r */
5
7
allowCR : boolean ;
Original file line number Diff line number Diff line change @@ -327,7 +327,7 @@ async function* readStreamAsEvents(stream: ReadableStream<Uint8Array>): AsyncGen
327
327
async function * readStreamAsTextLines ( stream : ReadableStream < Uint8Array > ) : AsyncGenerator < string > {
328
328
const linesReader = stream
329
329
. pipeThrough ( new TextDecoderStream ( ) )
330
- . pipeThrough ( new TextLineStream ( ) )
330
+ . pipeThrough ( new TextLineStream ( ) as ReadableWritablePair < string | undefined , string > )
331
331
. getReader ( ) ;
332
332
while ( true ) {
333
333
const { value, done } = await linesReader . read ( ) ;
You can’t perform that action at this time.
0 commit comments