Skip to content

Commit 1a12d83

Browse files
committed
buffer: add docstring for Blob.bytes()
Add docstring that clarifies the return type of Blob.bytes() (`Promise<Uint8Array>`) Refs: nodejs#53221
1 parent 9ef0086 commit 1a12d83

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/internal/blob.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,10 @@ class Blob {
312312
return dec.decode(await this.arrayBuffer());
313313
}
314314

315+
/**
316+
* @returns {Promise<Uint8Array>}
317+
*/
318+
315319
bytes() {
316320
if (!isBlob(this))
317321
throw new ERR_INVALID_THIS('Blob');

0 commit comments

Comments
 (0)