UNPKG

@kwsites/exec-p

Version:

Execute a command and retrieve data as a promise.

10 lines (9 loc) 426 B
/// <reference types="node" /> import { SpawnOptions } from 'child_process'; /** * Spawns a child process to run the specified command. When there is a non-zero exit code, and there has been * output to `stderr` the resulting promise will throw and must be caught by the caller. * * @returns {Promise<string>} */ export declare function execP(command: string, params?: string[], options?: SpawnOptions): Promise<string>;