Skip to content

WritableStreamDefaultWriter

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2877

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.

MDN Reference

W = any

new WritableStreamDefaultWriter<W>(stream): WritableStreamDefaultWriter<W>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2878

WritableStream

WritableStreamDefaultWriter<W>

readonly closed: Promise<void>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2884

The closed read-only property of the the stream errors or the writer’s lock is released.

MDN Reference


readonly desiredSize: null | number

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2896

The desiredSize read-only property of the to fill the stream’s internal queue.

MDN Reference


readonly ready: Promise<void>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2890

The ready read-only property of the 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.

MDN Reference

abort(reason?): Promise<void>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2902

The abort() method of the 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.

MDN Reference

any

Promise<void>


close(): Promise<void>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2908

The close() method of the stream.

MDN Reference

Promise<void>


releaseLock(): void

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2920

The releaseLock() method of the corresponding stream.

MDN Reference

void


write(chunk?): Promise<void>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:2914

The write() method of the operation.

MDN Reference

W

Promise<void>