WritableStreamDefaultWriter

interface

interface WritableStreamDefaultWriter<W = any>

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.

variable

var WritableStreamDefaultWriter: { … }

The constructor object for WritableStreamDefaultWriter, used to create a writer locked to the given WritableStream. Most code obtains one via WritableStream.getWriter instead.

Constructors

constructor

new WritableStreamDefaultWriter<W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>

Properties

closed

readonly closed: Promise<void>

desiredSize

readonly desiredSize: number | null

ready

readonly ready: Promise<void>

prototype

readonly prototype: WritableStreamDefaultWriter

Methods

abort

abort(reason?: any): Promise<void>

close

close(): Promise<void>

releaseLock

releaseLock(): void

write

write(chunk?: W): Promise<void>