Skip to content

Commit

Permalink
added JSDoc to blob bytes method
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertoSimonini1 committed Jul 30, 2024
1 parent 027710e commit 033f174
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/internal/blob.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ class Blob {
markTransferMode(this, true, false);

if (sources === null ||
typeof sources[SymbolIterator] !== 'function' ||
typeof sources === 'string') {
typeof sources[SymbolIterator] !== 'function' ||
typeof sources === 'string') {
throw new ERR_INVALID_ARG_TYPE('sources', 'a sequence', sources);
}
validateDictionary(options, 'options');
Expand Down Expand Up @@ -312,6 +312,9 @@ class Blob {
return dec.decode(await this.arrayBuffer());
}

/**
* @returns {Promise<Uint8Array>}
*/
bytes() {
if (!isBlob(this))
throw new ERR_INVALID_THIS('Blob');
Expand Down

0 comments on commit 033f174

Please sign in to comment.