write method

JSPromise<JSAny?> write([
  1. JSAny? chunk
])

The write() method of the WritableStreamDefaultWriter interface writes a passed chunk of data to a WritableStream and its underlying sink, then returns a Promise that resolves to indicate the success or failure of the write operation.

Note that what "success" means is up to the underlying sink; it might indicate that the chunk has been accepted, and not necessarily that it is safely saved to its ultimate destination.

Implementation

external JSPromise<JSAny?> write([JSAny? chunk]);