Skip to content

Commit ba8cdc2

Browse files
authored
doc: add missing return types in buffer.md
Add return types for Blob methods and legacy Base64 helpers so doc-kit does not render them as `void`. Refs: nodejs/doc-kit#953 Signed-off-by: inoway46 <inoueyuya416@gmail.com> PR-URL: #65308 Refs: nodejs/doc-kit#953 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent cf30b2e commit ba8cdc2

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)