Classes
WritableStreamDefaultWriter
This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the writer to the WritableStream ensuring that no other streams can write to the underlying sink.
Type Parameters
Type Parameter | Default type |
---|---|
W | any |
Constructors
new WritableStreamDefaultWriter()
new WritableStreamDefaultWriter<W
>(stream
): WritableStreamDefaultWriter
<W
>
Parameters
Parameter | Type |
---|---|
stream | WritableStream <W > |
Returns
WritableStreamDefaultWriter
<W
>
Properties
Property | Modifier | Type | Description |
---|---|---|---|
closed | readonly | Promise <undefined > | MDN Reference |
desiredSize | readonly | null | number | MDN Reference |
ready | readonly | Promise <undefined > | MDN Reference |
Methods
abort()
abort(reason
?): Promise
<void
>
Parameters
Parameter | Type |
---|---|
reason ? | any |
Returns
Promise
<void
>
close()
close(): Promise
<void
>
Returns
Promise
<void
>
releaseLock()
releaseLock(): void
Returns
void
write()
write(chunk
?): Promise
<void
>
Parameters
Parameter | Type |
---|---|
chunk ? | W |
Returns
Promise
<void
>