Interface WritableStreamDefaultWriter<W>
interface WritableStreamDefaultWriter<W> {
closed: Promise<undefined>;
desiredSize: number;
ready: Promise<undefined>;
abort(reason?: any): Promise<void>;
close(): Promise<void>;
releaseLock(): void;
write(chunk?: W): Promise<void>;
}
closed: Promise<undefined>;
desiredSize: number;
ready: Promise<undefined>;
abort(reason?: any): Promise<void>;
close(): Promise<void>;
releaseLock(): void;
write(chunk?: W): Promise<void>;
}
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.
MDN Reference