buffer: add JSDoc to blob bytes method

PR-URL: https://github.com/nodejs/node/pull/54117
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
Roberto Simonini authored and Michaël Zasso committed 2024-08-14 08:14:51 +02:00
1 parent 358fdacec6
commit 37631f826b
1 file changed
+3
+3
View File
@@ -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');