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.
Extends
Section titled “Extends”WritableStream<ArrayBuffer|ArrayBufferView>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DigestStream(
algorithm):DigestStream
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:1455
Parameters
Section titled “Parameters”algorithm
Section titled “algorithm”string | SubtleCryptoHashAlgorithm
Returns
Section titled “Returns”DigestStream
Overrides
Section titled “Overrides”Properties
Section titled “Properties”digest
Section titled “digest”
readonlydigest:Promise<ArrayBuffer>
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:1456
locked
Section titled “locked”
readonlylocked: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.
Inherited from
Section titled “Inherited from”Accessors
Section titled “Accessors”bytesWritten
Section titled “bytesWritten”Get Signature
Section titled “Get Signature”get bytesWritten():
number|bigint
Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:1457
Returns
Section titled “Returns”number | bigint
Methods
Section titled “Methods”abort()
Section titled “abort()”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.
Parameters
Section titled “Parameters”reason?
Section titled “reason?”any
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”close()
Section titled “close()”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.
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”getWriter()
Section titled “getWriter()”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.
Returns
Section titled “Returns”WritableStreamDefaultWriter<ArrayBuffer | ArrayBufferView<ArrayBufferLike>>