From 487164d6f6dc939985803fecfefb3e9dc0de3424 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 8 Sep 2022 18:07:56 -0700 Subject: [PATCH 1/2] fix: add import long to the generated .d.ts --- cli/pbts.js | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/pbts.js b/cli/pbts.js index e1e003760..7169bd945 100644 --- a/cli/pbts.js +++ b/cli/pbts.js @@ -171,6 +171,7 @@ exports.main = function(args, callback) { }); } + output.push("import Long = require(\"long\");"); output = output.join("\n") + "\n" + out.join(""); try { From 36179ce1d6ba2a166f84e288dbe358db5f877199 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 9 Sep 2022 00:28:53 -0700 Subject: [PATCH 2/2] fix: do not add import long to the main index.d.ts --- cli/pbts.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/pbts.js b/cli/pbts.js index 7169bd945..ffaf0c6c6 100644 --- a/cli/pbts.js +++ b/cli/pbts.js @@ -169,9 +169,10 @@ exports.main = function(args, callback) { Object.keys(imports).forEach(function(key) { output.push("import * as " + key + " from \"" + imports[key] + "\";"); }); + + output.push("import Long = require(\"long\");"); } - output.push("import Long = require(\"long\");"); output = output.join("\n") + "\n" + out.join(""); try {