UNPKG

1.3 kBTypeScriptView Raw
1// Type definitions for cross-spawn 6.0
2// Project: https://github.com/moxystudio/node-cross-spawn
3// Definitions by: Alorel <https://github.com/Alorel>
4// ExE Boss <https://github.com/ExE-Boss>
5// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6
7/// <reference types="node" />
8
9import * as child_process from 'child_process';
10
11declare namespace spawn {
12 /**
13 * The `spawn()` method spawns a new process using the given `command`, with
14 * command line arguments in `args`. If omitted, `args` defaults to an empty array.
15 */
16 const spawn: typeof child_process.spawn;
17
18 /**
19 * The `spawn.sync()` method spawns a new process using the given `command`, with
20 * command line arguments in `args`. If omitted, `args` defaults to an empty array.
21 */
22 const sync: typeof child_process.spawnSync;
23}
24
25/**
26 * The `spawn()` method spawns a new process using the given `command`, with
27 * command line arguments in `args`. If omitted, `args` defaults to an empty array.
28 */
29declare function spawn(command: string, options: child_process.SpawnOptions): child_process.ChildProcess;
30declare function spawn(
31 command: string,
32 args?: ReadonlyArray<string>,
33 options?: child_process.SpawnOptions,
34): child_process.ChildProcess;
35
36export = spawn;