mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-30 23:30:06 +00:00
node: Correct type of SpawnSyncReturns. (#36263)
* node: Correct type of SpawnSyncReturns. * cross-spawn: Fix tests for updated node types * node: Correct SpawnSyncReturns in v10 and v11.
This commit is contained in:
committed by
Daniel Rosenwasser
parent
1aa129cacb
commit
58607ca641
@@ -12,8 +12,8 @@ const r1: Error | undefined = spawn.sync('foo').error;
|
||||
const r2: string[] = spawn.sync('foo').output;
|
||||
const r3: Buffer = spawn.sync('foo').stdout;
|
||||
const r4: Buffer = spawn.sync('foo').stderr;
|
||||
const r5: number = spawn.sync('foo').status;
|
||||
const r6: string = spawn.sync('foo').signal;
|
||||
const r5: number | null = spawn.sync('foo').status;
|
||||
const r6: string | null = spawn.sync('foo').signal;
|
||||
const r7: string = spawn.sync('foo', {encoding: 'utf8'}).stdout;
|
||||
|
||||
spawn.sync('foo', ['bar']);
|
||||
|
||||
4
types/node/child_process.d.ts
vendored
4
types/node/child_process.d.ts
vendored
@@ -310,8 +310,8 @@ declare module "child_process" {
|
||||
output: string[];
|
||||
stdout: T;
|
||||
stderr: T;
|
||||
status: number;
|
||||
signal: string;
|
||||
status: number | null;
|
||||
signal: string | null;
|
||||
error?: Error;
|
||||
}
|
||||
function spawnSync(command: string): SpawnSyncReturns<Buffer>;
|
||||
|
||||
4
types/node/v10/child_process.d.ts
vendored
4
types/node/v10/child_process.d.ts
vendored
@@ -292,8 +292,8 @@ declare module "child_process" {
|
||||
output: string[];
|
||||
stdout: T;
|
||||
stderr: T;
|
||||
status: number;
|
||||
signal: string;
|
||||
status: number | null;
|
||||
signal: string | null;
|
||||
error?: Error;
|
||||
}
|
||||
function spawnSync(command: string): SpawnSyncReturns<Buffer>;
|
||||
|
||||
4
types/node/v11/child_process.d.ts
vendored
4
types/node/v11/child_process.d.ts
vendored
@@ -310,8 +310,8 @@ declare module "child_process" {
|
||||
output: string[];
|
||||
stdout: T;
|
||||
stderr: T;
|
||||
status: number;
|
||||
signal: string;
|
||||
status: number | null;
|
||||
signal: string | null;
|
||||
error?: Error;
|
||||
}
|
||||
function spawnSync(command: string): SpawnSyncReturns<Buffer>;
|
||||
|
||||
Reference in New Issue
Block a user