From 9f5b6d23534c190980f75433670f84825c5d4b92 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Fri, 2 Oct 2015 12:35:01 +0100 Subject: [PATCH] fix(doc-gen): ignore resolved symbols that have no declarations --- .../typescript-package/processors/readTypeScriptModules.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/api-builder/typescript-package/processors/readTypeScriptModules.js b/public/api-builder/typescript-package/processors/readTypeScriptModules.js index a7cf98f36b..56e3bf6498 100644 --- a/public/api-builder/typescript-package/processors/readTypeScriptModules.js +++ b/public/api-builder/typescript-package/processors/readTypeScriptModules.js @@ -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);