diff --git a/lib/internal/blob.js b/lib/internal/blob.js index 450ad593f44507..3362feb43cbc2a 100644 --- a/lib/internal/blob.js +++ b/lib/internal/blob.js @@ -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'); @@ -312,6 +312,9 @@ class Blob { return dec.decode(await this.arrayBuffer()); } + /** + * @returns {Promise} + */ bytes() { if (!isBlob(this)) throw new ERR_INVALID_THIS('Blob');