From 81ce06d2824217161129f731762c00dc6c4ff1a3 Mon Sep 17 00:00:00 2001 From: inoway46 Date: Sun, 16 Aug 2026 02:48:39 +0900 Subject: [PATCH] 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 --- doc/api/buffer.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 05d8113ace68..7d4a70a37877 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -536,6 +536,8 @@ added: - v20.16.0 --> +* Returns: {Promise} + The `blob.bytes()` method returns the byte of the `Blob` object as a `Promise`. ```js @@ -566,6 +568,7 @@ added: * `start` {number} The starting index. * `end` {number} The ending index. * `type` {string} The content-type for the new `Blob` +* Returns: {Blob} Creates and returns a new `Blob` containing a subset of this `Blob` objects data. The original `Blob` is not altered. @@ -5278,6 +5281,7 @@ added: > Stability: 3 - Legacy. Use `Buffer.from(data, 'base64')` instead. * `data` {any} The Base64-encoded input string. +* Returns: {string} Decodes a string of Base64-encoded data into bytes, and encodes those bytes into a string using Latin-1 (ISO-8859-1). @@ -5308,6 +5312,7 @@ added: > Stability: 3 - Legacy. Use `buf.toString('base64')` instead. * `data` {any} An ASCII (Latin1) string. +* Returns: {string} Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes into a string using Base64.