Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
buffer: add docstring for Blob.bytes()
Add docstring that clarifies the return type of Blob.bytes()
(`Promise<Uint8Array>`)

Refs: #53221
  • Loading branch information
sendoru committed Jul 30, 2024
commit 1a12d8306f273f9bda164caf2217a49511951a04
4 changes: 4 additions & 0 deletions lib/internal/blob.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ class Blob {
return dec.decode(await this.arrayBuffer());
}

/**
* @returns {Promise<Uint8Array>}
*/

bytes() {
if (!isBlob(this))
throw new ERR_INVALID_THIS('Blob');
Expand Down