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 2024-08-05 02:29:07 +02:00 committed by GitHub
parent c6cf313bca
commit a3cd290f24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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');