From 31c9c82f6c00c890c4676d7fc8744d17d810db8b Mon Sep 17 00:00:00 2001 From: Nadav Hollander Date: Sun, 24 Dec 2017 10:05:52 -0800 Subject: Fix typing generation for arrays in which types separated by |s --- packages/abi-gen/src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/abi-gen/src/utils.ts b/packages/abi-gen/src/utils.ts index eaf5a30cc..b3f60a02a 100644 --- a/packages/abi-gen/src/utils.ts +++ b/packages/abi-gen/src/utils.ts @@ -10,7 +10,7 @@ export const utils = { if (solType.match(trailingArrayRegex)) { const arrayItemSolType = solType.replace(trailingArrayRegex, ''); const arrayItemTsType = utils.solTypeToTsType(paramKind, arrayItemSolType); - const arrayTsType = `${arrayItemTsType}[]`; + const arrayTsType = `(${arrayItemTsType})[]`; return arrayTsType; } else { const solTypeRegexToTsType = [ -- cgit v1.2.3