Эх сурвалжийг харах

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

Christian Kahlau 4 жил өмнө
parent
commit
71351f6afa

+ 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 = "";

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно