docs(bun-types): Replace depricated readableStreamToText in type docu… (#24372)

Co-authored-by: Alistair Smith <hi@alistair.sh>
This commit is contained in:
nkxxll
2025-11-04 16:43:46 +01:00
committed by GitHub
parent 359f04d81f
commit f8dce87f24

View File

@@ -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"
* ```
*