From f8dce87f2483430537709756afb58e995b165de6 Mon Sep 17 00:00:00 2001 From: nkxxll <84667783+nkxxll@users.noreply.github.com> Date: Tue, 4 Nov 2025 16:43:46 +0100 Subject: [PATCH] =?UTF-8?q?docs(bun-types):=20Replace=20depricated=20reada?= =?UTF-8?q?bleStreamToText=20in=20type=20docu=E2=80=A6=20(#24372)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alistair Smith --- packages/bun-types/bun.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/bun-types/bun.d.ts b/packages/bun-types/bun.d.ts index 5215fda802..c4be932f93 100644 --- a/packages/bun-types/bun.d.ts +++ b/packages/bun-types/bun.d.ts @@ -5791,11 +5791,11 @@ declare module "bun" { * @category Process Management * * ```js - * const subprocess = Bun.spawn({ + * const proc = Bun.spawn({ * cmd: ["echo", "hello"], * stdout: "pipe", * }); - * const text = await readableStreamToText(subprocess.stdout); + * const text = await proc.stdout.text(); * console.log(text); // "hello\n" * ``` * @@ -5829,8 +5829,8 @@ declare module "bun" { * Spawn a new process * * ```js - * const {stdout} = Bun.spawn(["echo", "hello"]); - * const text = await readableStreamToText(stdout); + * const proc = Bun.spawn(["echo", "hello"]); + * const text = await proc.stdout.text(); * console.log(text); // "hello\n" * ``` *