summaryrefslogtreecommitdiff
path: root/cli/dts/lib.deno.ns.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
-rw-r--r--cli/dts/lib.deno.ns.d.ts24
1 files changed, 23 insertions, 1 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts
index f8ec0c7f3..b607554e1 100644
--- a/cli/dts/lib.deno.ns.d.ts
+++ b/cli/dts/lib.deno.ns.d.ts
@@ -1910,7 +1910,29 @@ declare namespace Deno {
: (Reader & Closer) | null;
readonly stderr: T["stderr"] extends "piped" ? Reader & Closer
: (Reader & Closer) | null;
- /** Resolves to the current status of the process. */
+ /** Wait for the process to exit and return its exit status.
+ *
+ * Calling this function multiple times will return the same status.
+ *
+ * Stdin handle to the process will be closed before waiting to avoid
+ * a deadlock.
+ *
+ * If `stdout` and/or `stderr` were set to `"piped"`, they must be closed
+ * manually before the process can exit.
+ *
+ * To run process to completion and collect output from both `stdout` and
+ * `stderr` use:
+ *
+ * ```ts
+ * const p = Deno.run({ cmd, stderr: 'piped', stdout: 'piped' });
+ * const [status, stdout, stderr] = await Promise.all([
+ * p.status(),
+ * p.output(),
+ * p.stderrOutput()
+ * ]);
+ * p.close();
+ * ```
+ **/
status(): Promise<ProcessStatus>;
/** Buffer the stdout until EOF and return it as `Uint8Array`.
*