Skip to content

DigestStream

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

The WritableStream interface of the Streams API provides a standard abstraction for writing streaming data to a destination, known as a sink.

MDN Reference

new DigestStream(algorithm): DigestStream

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

string | SubtleCryptoHashAlgorithm

DigestStream

WritableStream.constructor

readonly digest: Promise<ArrayBuffer>

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


readonly locked: boolean

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

The locked read-only property of the WritableStream interface returns a boolean indicating whether the WritableStream is locked to a writer.

MDN Reference

WritableStream.locked

get bytesWritten(): number | bigint

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

number | bigint

abort(reason?): Promise<void>

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

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

MDN Reference

any

Promise<void>

WritableStream.abort


close(): Promise<void>

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

The close() method of the WritableStream interface closes the associated stream.

MDN Reference

Promise<void>

WritableStream.close


getWriter(): WritableStreamDefaultWriter<ArrayBuffer | ArrayBufferView<ArrayBufferLike>>

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

The getWriter() method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance.

MDN Reference

WritableStreamDefaultWriter<ArrayBuffer | ArrayBufferView<ArrayBufferLike>>

WritableStream.getWriter