fix(doclint): fix doclint for new typescript

This commit is contained in:
Joel Einbinder 2020-02-06 16:18:32 -08:00
parent 75340f34ad
commit 69e58ce318

View file

@ -222,9 +222,9 @@ function checkSources(sources, externalDependencies) {
properties.push(...innerType.properties);
innerTypeNames.push(innerType.name);
}
if (innerTypeNames.length === 1 && innerTypeNames[0] === 'void')
return new Documentation.Type(type.symbol.name);
return new Documentation.Type(`${type.symbol.name}<${innerTypeNames.join(', ')}>`, properties);
if (innerTypeNames.length === 0 || (innerTypeNames.length === 1 && innerTypeNames[0] === 'void'))
return new Documentation.Type(expandPrefix(type.symbol.name));
return new Documentation.Type(`${expandPrefix(type.symbol.name)}<${innerTypeNames.join(', ')}>`, properties);
}
return new Documentation.Type(expandPrefix(typeName), []);
}