From 2ee55145c06e5986c96f9eb40653464e81d79413 Mon Sep 17 00:00:00 2001 From: Michael Lazarev Date: Tue, 2 May 2023 00:52:56 +0300 Subject: docs: correct example of piping the output of a subprocess to a file (#18933) Fixes #18909 --- cli/tsc/dts/lib.deno.ns.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cli/tsc/dts/lib.deno.ns.d.ts') diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts index 74d3ffb0b..90a12ad42 100644 --- a/cli/tsc/dts/lib.deno.ns.d.ts +++ b/cli/tsc/dts/lib.deno.ns.d.ts @@ -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(); -- cgit v1.2.3