mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
docs(bun-types): Replace depricated readableStreamToText in type docu… (#24372)
Co-authored-by: Alistair Smith <hi@alistair.sh>
This commit is contained in:
8
packages/bun-types/bun.d.ts
vendored
8
packages/bun-types/bun.d.ts
vendored
@@ -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"
|
||||
* ```
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user