Sink.write can return void or a promise

This commit is contained in:
Mattias Buelens
2018-06-10 00:57:43 +02:00
parent fa4578fa74
commit 04c52fd538
+1 -1
View File
@@ -96,7 +96,7 @@ declare class ReadableStreamBYOBRequest<R = ArrayBufferView> {
interface WritableStreamSink<W = ArrayBufferView> {
start?(controller: WritableStreamDefaultController<W>): void | Promise<void>;
write?(chunk: W, controller?: WritableStreamDefaultController<W>): any;
write?(chunk: W, controller?: WritableStreamDefaultController<W>): void | Promise<void>;
close?(controller: WritableStreamDefaultController<W>): void | Promise<void>;
abort?(reason: any): void | Promise<void>;
}