feat(docs): export type info for var and const exports

Closes #3700
This commit is contained in:
Brian Ford
2015-08-19 16:04:43 -07:00
parent 3963e0ab39
commit 9262727ae1
3 changed files with 11 additions and 3 deletions

View File

@ -188,6 +188,12 @@ module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo,
location: getLocation(exportSymbol)
};
if (exportDoc.docType === 'var' || exportDoc.docType === 'const') {
exportDoc.symbolTypeName = exportSymbol.valueDeclaration.type &&
exportSymbol.valueDeclaration.type.typeName &&
exportSymbol.valueDeclaration.type.typeName.text;
}
if(exportSymbol.flags & ts.SymbolFlags.Function) {
exportDoc.parameters = getParameters(typeChecker, exportSymbol);
}