@figliolia/child-process
Version:
A wrapper around the node.js spawn function providing a promise and graceful exiting
16 lines (15 loc) • 704 B
TypeScript
/// <reference types="node" />
/// <reference types="node" />
import { exec } from "node:child_process";
import type { SpawnOptions, ChildProcess as Child_Process } from "node:child_process";
export declare class ChildProcess {
process: Child_Process;
handler: Promise<void>;
static execute: typeof exec.__promisify__;
constructor(command: string, options?: SpawnOptions);
static wrapCommand(command: string, options?: SpawnOptions): Promise<void>;
static promisify(CP: Child_Process): Promise<void>;
static split(command: string): [command: string, args: readonly string[]];
static get parentProcess(): NodeJS.Process;
static bindExits(CPs: Child_Process[]): void;
}