diff options
author | Nadav Hollander <nadav@dharma.io> | 2017-12-25 02:05:52 +0800 |
---|---|---|
committer | Nadav Hollander <nadav@dharma.io> | 2017-12-25 02:16:06 +0800 |
commit | 31c9c82f6c00c890c4676d7fc8744d17d810db8b (patch) | |
tree | 28a5c51498efb6517ee1841de155259e1889bb5d | |
parent | cbf06b2165715aaadf1afb6fb84040837a7a8827 (diff) | |
download | dexon-sol-tools-31c9c82f6c00c890c4676d7fc8744d17d810db8b.tar dexon-sol-tools-31c9c82f6c00c890c4676d7fc8744d17d810db8b.tar.gz dexon-sol-tools-31c9c82f6c00c890c4676d7fc8744d17d810db8b.tar.bz2 dexon-sol-tools-31c9c82f6c00c890c4676d7fc8744d17d810db8b.tar.lz dexon-sol-tools-31c9c82f6c00c890c4676d7fc8744d17d810db8b.tar.xz dexon-sol-tools-31c9c82f6c00c890c4676d7fc8744d17d810db8b.tar.zst dexon-sol-tools-31c9c82f6c00c890c4676d7fc8744d17d810db8b.zip |
Fix typing generation for arrays in which types separated by |s
-rw-r--r-- | packages/abi-gen/src/utils.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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 = [ |