浏览代码

correct namespace declaration in root module

Christian Kahlau 4 年之前
父节点
当前提交
3b92ce71d4
共有 9 个文件被更改,包括 15 次插入17 次删除
  1. 5 0
      index.d.ts
  2. 1 1
      index.d.ts.map
  3. 0 7
      index.js
  4. 1 1
      index.js.map
  5. 5 3
      index.ts
  6. 1 1
      shell/index.d.ts.map
  7. 1 2
      shell/index.js
  8. 0 0
      shell/index.js.map
  9. 1 2
      shell/index.ts

+ 5 - 0
index.d.ts

@@ -1,3 +1,8 @@
+import { exec, spawn } from './shell';
 export declare namespace NodeUtils {
+    type Shell = {
+        exec: typeof exec;
+        spawn: typeof spawn;
+    };
 }
 //# sourceMappingURL=index.d.ts.map

+ 1 - 1
index.d.ts.map

@@ -1 +1 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAEA,yBAAiB,SAAS,CAAC;CAG1B"}
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEtC,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IAC/B,KAAK,KAAK,GAAG;QACT,IAAI,EAAE,OAAO,IAAI,CAAC;QAClB,KAAK,EAAE,OAAO,KAAK,CAAC;KACvB,CAAA;CACJ"}

+ 0 - 7
index.js

@@ -1,10 +1,3 @@
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
-exports.NodeUtils = void 0;
-var shell_1 = require("./shell");
-var NodeUtils;
-(function (NodeUtils) {
-    shell_1.exec;
-    shell_1.spawn;
-})(NodeUtils = exports.NodeUtils || (exports.NodeUtils = {}));
 //# sourceMappingURL=index.js.map

+ 1 - 1
index.js.map

@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,iCAAsC;AAEtC,IAAiB,SAAS,CAGzB;AAHD,WAAiB,SAAS;IACtB,YAAI,CAAC;IACL,aAAK,CAAC;AACV,CAAC,EAHgB,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGzB"}
+{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":""}

+ 5 - 3
index.ts

@@ -1,6 +1,8 @@
 import { exec, spawn } from './shell';
 
-export namespace NodeUtils {
-    exec;
-    spawn;
+export declare namespace NodeUtils {
+    type Shell = {
+        exec: typeof exec;
+        spawn: typeof spawn;
+    }
 }

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

@@ -1 +1 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAKA,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,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"}

+ 1 - 2
shell/index.js

@@ -2,7 +2,6 @@
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.spawn = exports.exec = void 0;
 var child_process_1 = require("child_process");
-var child_process_2 = require("child_process");
 var MAX_BUFFER = 10 * Math.pow(2, 20);
 function exec(command, stdout, stderr) {
     return new Promise(function (resolve, reject) {
@@ -63,7 +62,7 @@ exports.exec = exec;
 function spawn(command, args, stdout, stderr) {
     return new Promise(function (resolve, reject) {
         try {
-            var p = child_process_2.spawn(command, args);
+            var p = child_process_1.spawn(command, args);
             if (stdout)
                 p.stdout.pipe(stdout);
             if (stderr)

文件差异内容过多而无法显示
+ 0 - 0
shell/index.js.map


+ 1 - 2
shell/index.ts

@@ -1,5 +1,4 @@
-import { exec as shell_exec } from 'child_process';
-import { spawn as shell_spawn } from 'child_process';
+import { exec as shell_exec, spawn as shell_spawn } from 'child_process';
 
 const MAX_BUFFER = 10 * Math.pow(2, 20);
 

部分文件因为文件数量过多而无法显示