diff --git a/spec/asynciterable/inference-spec.ts b/spec/asynciterable/inference-spec.ts index deddd551..77726de6 100644 --- a/spec/asynciterable/inference-spec.ts +++ b/spec/asynciterable/inference-spec.ts @@ -32,11 +32,11 @@ describe('AsyncIterable type inference', () => { if (TEST_DOM_STREAMS) { test('#pipeThrough type inference is correct with transform stream', () => { - const source = of(0, 1, 2).pipeThrough(new TransformStream()); + const source = of(0, 1, 2).pipeThrough(new TransformStream()); expect(source).toEqualStream([0, 1, 2]); }); test('#pipeThrough type inference is correct with transform stream and pipe options', () => { - const source = of(0, 1, 2).pipeThrough(new TransformStream(), { + const source = of(0, 1, 2).pipeThrough(new TransformStream(), { preventClose: false, }); expect(source).toEqualStream([0, 1, 2]); diff --git a/spec/iterable/inference-spec.ts b/spec/iterable/inference-spec.ts index 948a224c..a2d2d269 100644 --- a/spec/iterable/inference-spec.ts +++ b/spec/iterable/inference-spec.ts @@ -33,11 +33,11 @@ describe('Iterable type inference', () => { if (TEST_DOM_STREAMS) { test('#pipeThrough type inference is correct with writable stream', () => { - const source = of(0, 1, 2).pipeThrough(new TransformStream()); + const source = of(0, 1, 2).pipeThrough(new TransformStream()); expect(source).toEqualStream([0, 1, 2]); }); test('#pipeThrough type inference is correct with writable stream and pipe options', () => { - const source = of(0, 1, 2).pipeThrough(new TransformStream(), { + const source = of(0, 1, 2).pipeThrough(new TransformStream(), { preventClose: false, }); expect(source).toEqualStream([0, 1, 2]); diff --git a/src/asynciterable/todomstream.ts b/src/asynciterable/todomstream.ts index aeb8e475..cb052851 100644 --- a/src/asynciterable/todomstream.ts +++ b/src/asynciterable/todomstream.ts @@ -267,6 +267,6 @@ declare module '../asynciterable/asynciterablex' { pipeThrough>( duplex: { writable: WritableStream; readable: R }, options?: StreamPipeOptions - ): ReadableStream; + ): R; } } diff --git a/src/iterable/todomstream.ts b/src/iterable/todomstream.ts index 0c9c4482..000d24e6 100644 --- a/src/iterable/todomstream.ts +++ b/src/iterable/todomstream.ts @@ -85,6 +85,6 @@ declare module '../iterable/iterablex' { pipeThrough>( duplex: { writable: WritableStream; readable: R }, options?: StreamPipeOptions - ): ReadableStream; + ): R; } }