mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
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:
parent
c6cf313bca
commit
a3cd290f24
1 changed files with 3 additions and 0 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue