fix(typings): update test.typings for abstract superclasses

This commit is contained in:
Alex Eagle
2015-10-06 19:39:44 -07:00
committed by vsavkin
parent 6075509f26
commit 5458036de7
34 changed files with 122 additions and 71 deletions

View File

@ -223,6 +223,9 @@ module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo,
if (exportSymbol.flags & ts.SymbolFlags.TypeAlias) {
exportDoc.typeDefinition = typeDefinition;
}
if (isAbstract(exportSymbol)) {
exportDoc.abstract = true;
}
// Compute the original module name from the relative file path
exportDoc.originalModule = exportDoc.fileInfo.relativePath
@ -345,6 +348,10 @@ module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo,
}
}
function isAbstract(symbol) {
var declaration = symbol.valueDeclaration || symbol.declarations[0];
return declaration.flags & ts.NodeFlags.Abstract;
}
function expandSourceFiles(sourceFiles, basePath) {
var filePaths = [];