From f4cb63975932c939fbffe71ea0d9c7cca0805b93 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Thu, 13 Apr 2017 00:07:55 +0900 Subject: [PATCH] write method can return anything as anything will be resolved to Promise. Based on comment here: https://github.com/whatwg/streams/issues/45#issuecomment-293524914 --- types/whatwg-streams/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/whatwg-streams/index.d.ts b/types/whatwg-streams/index.d.ts index 4f1e26ee7c275e..a268f9f571975e 100644 --- a/types/whatwg-streams/index.d.ts +++ b/types/whatwg-streams/index.d.ts @@ -95,7 +95,7 @@ declare class ReadableStreamBYOBRequest { interface WritableStreamSink { start?(controller: WritableStreamDefaultController): void | Promise; - write?(chunk: any, controller?: WritableStreamDefaultController): void | Promise; + write?(chunk: any, controller?: WritableStreamDefaultController): any; close?(controller: WritableStreamDefaultController): void | Promise; abort?(reason: string): void | Promise; }