From fae7643648e5ddf6218d0e88a3c46cf168fee235 Mon Sep 17 00:00:00 2001 From: Michael Lazarev Date: Tue, 2 May 2023 00:52:56 +0300 Subject: [PATCH] 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(-) diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts index 74d3ffb0b4..90a12ad420 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();