소스 검색

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

Christian Kahlau 4 년 전
부모
커밋
6ce9b1e55d
4개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  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" />
-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>;
 //# 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"}

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 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);
 
-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) => {
         try {
             let stdoutbuf = "";

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.