Skip to main content

spawn() function

Signature:
export declare function spawn(command: string, args?: readonly string[], options?: SpawnOptions): Promise<SpawnResult>;

Parameters

ParameterTypeDescription
commandstring
argsreadonly string[](Optional)
optionsSpawnOptions(Optional)
Returns:

Promise<SpawnResult>

Exceptions

SpawnError Thrown if the process terminates with non-zero exit code.