From cb8bb47dee25c42d8662b935e9399a54816bb50a Mon Sep 17 00:00:00 2001 From: f2n2z7 <115435212@qq.com> Date: Tue, 9 Feb 2021 11:06:13 +0800 Subject: [PATCH] Update index.js fix tuple array --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 1c5e5d1..dd8f36c 100644 --- a/index.js +++ b/index.js @@ -13,6 +13,8 @@ function _getABIs() { function _typeToString(input) { if (input.type === "tuple") { return "(" + input.components.map(_typeToString).join(",") + ")"; + } else if (input.type.substring(0, "tuple".length) === "tuple") { // tuple[], or tuple[][], etc + return "(" + input.components.map(_typeToString).join(",") + ")" + input.type.substring("tuple".length); } return input.type; }