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:
Daniel Cassidy
2019-06-21 22:17:20 +01:00
committed by Daniel Rosenwasser
parent 1aa129cacb
commit 58607ca641
4 changed files with 8 additions and 8 deletions

View File

@@ -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']);

View File

@@ -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>;

View File

@@ -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>;

View File

@@ -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>;