From fb1f24dd6b2af6d672c8f1cd113cecf43fb135c6 Mon Sep 17 00:00:00 2001 From: Mattias Buelens Date: Sun, 10 Jun 2018 00:30:43 +0200 Subject: [PATCH] Allow any promise result type for source/sink/transformer methods --- types/whatwg-streams/index.d.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/types/whatwg-streams/index.d.ts b/types/whatwg-streams/index.d.ts index c6d5ea893b..975151a74d 100644 --- a/types/whatwg-streams/index.d.ts +++ b/types/whatwg-streams/index.d.ts @@ -6,15 +6,15 @@ // TypeScript Version: 2.3 export interface ReadableStreamSource { - start?(controller: ReadableStreamDefaultController): void | Promise; - pull?(controller: ReadableStreamDefaultController): void | Promise; - cancel?(reason: any): void | Promise; + start?(controller: ReadableStreamDefaultController): void | Promise; + pull?(controller: ReadableStreamDefaultController): void | Promise; + cancel?(reason: any): void | Promise; } export interface ReadableByteStreamSource { - start?(controller: ReadableByteStreamController): void | Promise; - pull?(controller: ReadableByteStreamController): void | Promise; - cancel?(reason: any): void | Promise; + start?(controller: ReadableByteStreamController): void | Promise; + pull?(controller: ReadableByteStreamController): void | Promise; + cancel?(reason: any): void | Promise; type: "bytes"; autoAllocateChunkSize?: number; @@ -95,10 +95,10 @@ declare class ReadableStreamBYOBRequest { } interface WritableStreamSink { - start?(controller: WritableStreamDefaultController): void | Promise; - write?(chunk: W, controller?: WritableStreamDefaultController): void | Promise; - close?(controller: WritableStreamDefaultController): void | Promise; - abort?(reason: any): void | Promise; + start?(controller: WritableStreamDefaultController): void | Promise; + write?(chunk: W, controller?: WritableStreamDefaultController): void | Promise; + close?(controller: WritableStreamDefaultController): void | Promise; + abort?(reason: any): void | Promise; } declare class WritableStream { @@ -140,9 +140,9 @@ declare class CountQueuingStrategy { } declare interface TransformStreamTransformer { - start?(controller: TransformStreamDefaultController): void | Promise; - transform?(chunk: W, controller: TransformStreamDefaultController): void | Promise; - flush?(controller: TransformStreamDefaultController): void | Promise; + start?(controller: TransformStreamDefaultController): void | Promise; + transform?(chunk: W, controller: TransformStreamDefaultController): void | Promise; + flush?(controller: TransformStreamDefaultController): void | Promise; } declare class TransformStream implements WritableReadablePair, ReadableStream> {