Merge pull request #295 from dharmaprotocol/fix-array-typing-generation

Fix array typing generation when permitting multiple types
This commit is contained in:
Leonid
2018-01-03 12:07:31 +01:00
committed by GitHub

View File

@@ -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 = [