WritableStreamDefaultWriter extension type
The WritableStreamDefaultWriter
interface of the
Streams API
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.
API documentation sourced from MDN Web Docs.
- on
- Implemented types
- Available extensions
Constructors
- WritableStreamDefaultWriter(WritableStream stream)
-
factory
Properties
-
closed
→ JSPromise<
JSAny?> -
The
closed
read-only property of the WritableStreamDefaultWriter interface returns aPromise
that fulfills if the stream becomes closed, or rejects if the stream errors or the writer's lock is released.no setter - desiredSize → double?
-
The
desiredSize
read-only property of the WritableStreamDefaultWriter interface returns the desired size required to fill the stream's internal queue.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
-
ready
→ JSPromise<
JSAny?> -
The
ready
read-only property of the WritableStreamDefaultWriter interface returns aPromise
that resolves when the desired size of the stream's internal queue transitions from non-positive to positive, signaling that it is no longer applying backpressure.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
abort(
[JSAny? reason]) → JSPromise< JSAny?> -
The
abort()
method of the WritableStreamDefaultWriter interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded. -
close(
) → JSPromise< JSAny?> -
The
close()
method of the WritableStreamDefaultWriter interface closes the associated writable stream. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
releaseLock(
) → void -
The
releaseLock()
method of the WritableStreamDefaultWriter interface releases the writer's lock on the corresponding stream. After the lock is released, the writer is no longer active. If the associated stream is errored when the lock is released, the writer will appear errored in the same way from now on; otherwise, the writer will appear closed. -
toString(
) → String -
A string representation of this object.
inherited
-
write(
[JSAny? chunk]) → JSPromise< JSAny?> -
The
write()
method of the WritableStreamDefaultWriter interface writes a passed chunk of data to a WritableStream and its underlying sink, then returns aPromise
that resolves to indicate the success or failure of the write operation.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited