mirror of
https://github.com/denoland/deno.git
synced 2024-11-28 16:20:57 -05:00
docs: correct example of piping the output of a subprocess to a file (#18933)
Fixes #18909
This commit is contained in:
parent
913176313b
commit
2ee55145c0
1 changed files with 4 additions and 1 deletions
5
cli/tsc/dts/lib.deno.ns.d.ts
vendored
5
cli/tsc/dts/lib.deno.ns.d.ts
vendored
|
@ -4003,11 +4003,14 @@ declare namespace Deno {
|
|||
* "console.log('Hello World')",
|
||||
* ],
|
||||
* stdin: "piped",
|
||||
* stdout: "piped",
|
||||
* });
|
||||
* const child = command.spawn();
|
||||
*
|
||||
* // open a file and pipe the subprocess output to it.
|
||||
* child.stdout.pipeTo(Deno.openSync("output").writable);
|
||||
* child.stdout.pipeTo(
|
||||
* Deno.openSync("output", { write: true, create: true }).writable,
|
||||
* );
|
||||
*
|
||||
* // manually close stdin
|
||||
* child.stdin.close();
|
||||
|
|
Loading…
Reference in a new issue