fix(dts generation): add support for type aliases

Closes #3952
This commit is contained in:
Igor Minar
2015-09-03 09:48:33 -07:00
parent ad3b9cf232
commit d78261695b
2 changed files with 9 additions and 0 deletions

View File

@ -205,6 +205,10 @@ module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo,
exportSymbol.valueDeclaration.type.typeName.text;
}
if (exportDoc.docType === 'type-alias') {
exportDoc.returnType = getReturnType(typeChecker, exportSymbol);
}
if(exportSymbol.flags & ts.SymbolFlags.Function) {
exportDoc.parameters = getParameters(typeChecker, exportSymbol);
}