import { Process } from "https://deno.land/x/denoexec@v1.1.5/lib/process.ts";
This looks like an initiated Deno.Process<Deno.RunOptions>
object as well
as a Promise<ProcessResults>
object at the same time.
It implements both interfaces.
Ported from https://github.com/brad-jones/dexeca/blob/master/lib/src/process.dart which in turn was originally inspired by https://github.com/sindresorhus/execa.
Constructors
new
Process(unnamed 0: ProcessOptions)Methods
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<ProcessResults | TResult>
close()
finally(onfinally?: (() => void) | undefined | null): Promise<ProcessResults>
kill(signo?: Deno.Signal)
UNSTABLE: The signo
argument may change to require the Deno.Signal
enum.
signo
is only used on Linux & MacOS and totally ignored by Windows.
This version of kill
supports Windows by shelling out to taskkill
.
output()
status()
then<TResult1 = ProcessResults, TResult2 = never>(onfulfilled?: ((value: ProcessResults) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>