mirror of
https://github.com/denoland/deno.git
synced 2025-02-08 07:16:56 -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')",
|
* "console.log('Hello World')",
|
||||||
* ],
|
* ],
|
||||||
* stdin: "piped",
|
* stdin: "piped",
|
||||||
|
* stdout: "piped",
|
||||||
* });
|
* });
|
||||||
* const child = command.spawn();
|
* const child = command.spawn();
|
||||||
*
|
*
|
||||||
* // open a file and pipe the subprocess output to it.
|
* // 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
|
* // manually close stdin
|
||||||
* child.stdin.close();
|
* child.stdin.close();
|
||||||
|
|
Loading…
Add table
Reference in a new issue