Skip to content

Commit 1737910

Browse files
committed
doc: add missing return types in buffer.md
Four entries in the buffer documentation described their return values only in prose, so doc-kit could not parse their return types and fell back to `void`: - `blob.bytes()` returns a promise that resolves with a `Uint8Array`. - `blob.slice()` returns a new `Blob`. - `buffer.atob()` and `buffer.btoa()` return strings. Refs: nodejs/doc-kit#953 Signed-off-by: inoway46 <[email protected]>
1 parent 91aaf05 commit 1737910

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎doc/api/buffer.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,8 @@ added:
536536
- v20.16.0
537537
-->
538538

539+
* Returns: {Promise}
540+
539541
The `blob.bytes()` method returns the byte of the `Blob` object as a `Promise<Uint8Array>`.
540542

541543
```js
@@ -566,6 +568,7 @@ added:
566568
* `start` {number} The starting index.
567569
* `end` {number} The ending index.
568570
* `type` {string} The content-type for the new `Blob`
571+
* Returns: {Blob}
569572

570573
Creates and returns a new `Blob` containing a subset of this `Blob` objects
571574
data. The original `Blob` is not altered.
@@ -5278,6 +5281,7 @@ added:
52785281
> Stability: 3 - Legacy. Use `Buffer.from(data, 'base64')` instead.
52795282
52805283
* `data` {any} The Base64-encoded input string.
5284+
* Returns: {string}
52815285

52825286
Decodes a string of Base64-encoded data into bytes, and encodes those bytes
52835287
into a string using Latin-1 (ISO-8859-1).
@@ -5308,6 +5312,7 @@ added:
53085312
> Stability: 3 - Legacy. Use `buf.toString('base64')` instead.
53095313
53105314
* `data` {any} An ASCII (Latin1) string.
5315+
* Returns: {string}
53115316

53125317
Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes
53135318
into a string using Base64.

0 commit comments

Comments
 (0)