Fix typing generation for arrays in which types separated by |s

This commit is contained in:
Nadav Hollander
2017-12-24 10:05:52 -08:00
parent cbf06b2165
commit 31c9c82f6c

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