fix(doc-gen): ignore resolved symbols that have no declarations

This commit is contained in:
Peter Bacon Darwin 2015-10-02 12:35:01 +01:00
parent b7ee016000
commit 9f5b6d2353
1 changed files with 7 additions and 0 deletions

View File

@ -60,6 +60,13 @@ module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo,
// If the symbol is an Alias then for most things we want the original resolved symbol
var resolvedExport = exportSymbol.resolvedSymbol || exportSymbol;
// If the resolved symbol contains no declarations then it is invalid
// (probably an abstract class)
// For the moment we are just going to ignore such exports
// TODO: find a way of generating docs for them
if (!resolvedExport.declarations) return;
var exportDoc = createExportDoc(exportSymbol.name, resolvedExport, moduleDoc, basePath, parseInfo.typeChecker);
log.debug('>>>> EXPORT: ' + exportDoc.name + ' (' + exportDoc.docType + ') from ' + moduleDoc.id);