Skip to main content
Module

x/denoexec/mod.ts>Process

A higher level wrapper around https://doc.deno.land/builtin/stable#Deno.run
Latest
class Process
implements [Deno.Process]<Deno.RunOptions>, Promise<ProcessResults>
import { Process } from "https://deno.land/x/denoexec@v1.1.5/mod.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)

Properties

readonly
pid
readonly
rid
readonly
stderr
readonly
stdin
readonly
stdout
readonly
[Symbol.toStringTag]

Methods

catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<ProcessResults | TResult>
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.

then<TResult1 = ProcessResults, TResult2 = never>(onfulfilled?: ((value: ProcessResults) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>