From 033f174f002e82f09fdf2efa2b4c3a4b13a6cdb4 Mon Sep 17 00:00:00 2001 From: RobertoSimonini1 Date: Tue, 30 Jul 2024 12:00:49 +0200 Subject: [PATCH] added JSDoc to blob bytes method --- lib/internal/blob.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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');