@expo/spawn-async
Version:
A Promise-based interface into processes created by child_process.spawn
22 lines (21 loc) • 722 B
TypeScript
/// <reference types="node" />
import { ChildProcess, SpawnOptions as NodeSpawnOptions } from 'child_process';
declare namespace spawnAsync {
interface SpawnOptions extends NodeSpawnOptions {
ignoreStdio?: boolean;
maxBuffer?: number;
}
interface SpawnPromise<T> extends Promise<T> {
child: ChildProcess;
}
interface SpawnResult {
pid?: number;
output: string[];
stdout: string;
stderr: string;
status: number | null;
signal: string | null;
}
}
declare function spawnAsync(command: string, args?: ReadonlyArray<string>, options?: spawnAsync.SpawnOptions): spawnAsync.SpawnPromise<spawnAsync.SpawnResult>;
export = spawnAsync;