mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* fix(cross‑spawn): Add missing `spawn(…)` function type definitions * refactor: Apply Prettier style
37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
// Type definitions for cross-spawn 6.0
|
|
// Project: https://github.com/moxystudio/node-cross-spawn
|
|
// Definitions by: Alorel <https://github.com/Alorel>
|
|
// ExE Boss <https://github.com/ExE-Boss>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
/// <reference types="node" />
|
|
|
|
import * as child_process from 'child_process';
|
|
|
|
declare namespace spawn {
|
|
/**
|
|
* The `spawn()` method spawns a new process using the given `command`, with
|
|
* command line arguments in `args`. If omitted, `args` defaults to an empty array.
|
|
*/
|
|
const spawn: typeof child_process.spawn;
|
|
|
|
/**
|
|
* The `spawn.sync()` method spawns a new process using the given `command`, with
|
|
* command line arguments in `args`. If omitted, `args` defaults to an empty array.
|
|
*/
|
|
const sync: typeof child_process.spawnSync;
|
|
}
|
|
|
|
/**
|
|
* The `spawn()` method spawns a new process using the given `command`, with
|
|
* command line arguments in `args`. If omitted, `args` defaults to an empty array.
|
|
*/
|
|
declare function spawn(command: string, options: child_process.SpawnOptions): child_process.ChildProcess;
|
|
declare function spawn(
|
|
command: string,
|
|
args?: ReadonlyArray<string>,
|
|
options?: child_process.SpawnOptions,
|
|
): child_process.ChildProcess;
|
|
|
|
export = spawn;
|