Browse Source

stdin/stdout parameters for shell/exec now optional; corrections to type definitions

Christian Kahlau 4 years ago
parent
commit
6ce9b1e55d
4 changed files with 3 additions and 3 deletions
  1. 1 1
      shell/index.d.ts
  2. 1 1
      shell/index.d.ts.map
  3. 0 0
      shell/index.js.map
  4. 1 1
      shell/index.ts

+ 1 - 1
shell/index.d.ts

@@ -1,4 +1,4 @@
 /// <reference types="node" />
 /// <reference types="node" />
-export declare function exec(command: string, stdout: (...args: any[]) => void | NodeJS.WriteStream, stderr: (...args: any[]) => void | NodeJS.WriteStream): Promise<string>;
+export declare function exec(command: string, stdout?: ((...args: any[]) => void) | NodeJS.WriteStream, stderr?: ((...args: any[]) => void) | NodeJS.WriteStream): Promise<string>;
 export declare function spawn(command: string, args: string[], stdout?: NodeJS.WriteStream, stderr?: NodeJS.WriteStream): Promise<void>;
 export declare function spawn(command: string, args: string[], stdout?: NodeJS.WriteStream, stderr?: NodeJS.WriteStream): Promise<void>;
 //# sourceMappingURL=index.d.ts.map
 //# sourceMappingURL=index.d.ts.map

+ 1 - 1
shell/index.d.ts.map

@@ -1 +1 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAIA,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,OAAA,KAAK,IAAI,GAAG,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,OAAA,KAAK,IAAI,GAAG,MAAM,CAAC,WAAW,mBAqDnI;AAED,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,WAAW,iBAqB9G"}
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAIA,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,OAAA,KAAK,IAAI,CAAC,GAAG,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,OAAA,KAAK,IAAI,CAAC,GAAG,MAAM,CAAC,WAAW,mBAqDzI;AAED,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,WAAW,iBAqB9G"}

File diff suppressed because it is too large
+ 0 - 0
shell/index.js.map


+ 1 - 1
shell/index.ts

@@ -2,7 +2,7 @@ import { exec as shell_exec, spawn as shell_spawn } from 'child_process';
 
 
 const MAX_BUFFER = 10 * Math.pow(2, 20);
 const MAX_BUFFER = 10 * Math.pow(2, 20);
 
 
-export function exec(command: string, stdout: (...args) => void | NodeJS.WriteStream, stderr: (...args) => void | NodeJS.WriteStream) {
+export function exec(command: string, stdout?: ((...args) => void) | NodeJS.WriteStream, stderr?: ((...args) => void) | NodeJS.WriteStream) {
     return new Promise<string>((resolve, reject) => {
     return new Promise<string>((resolve, reject) => {
         try {
         try {
             let stdoutbuf = "";
             let stdoutbuf = "";

Some files were not shown because too many files changed in this diff