chore(doc-gen): export interfaces over vars

If a symbol is declared as an interface and a var then we should export
it as an interface rather than a var.
This commit is contained in:
Peter Bacon Darwin 2015-07-29 06:50:18 +01:00 committed by Misko Hevery
parent 3437d56904
commit f6da89f74f
1 changed files with 6 additions and 6 deletions

View File

@ -3,12 +3,6 @@ var ts = require('typescript');
module.exports = function getExportDocType(log) {
return function(symbol) {
if(symbol.flags & ts.SymbolFlags.FunctionScopedVariable) {
return 'var';
}
if(symbol.flags & ts.SymbolFlags.BlockScopedVariable) {
return getBlockScopedVariableDocType(symbol);
}
if(symbol.flags & ts.SymbolFlags.Function) {
return 'function';
}
@ -30,6 +24,12 @@ module.exports = function getExportDocType(log) {
if(symbol.flags & ts.SymbolFlags.TypeAlias) {
return 'type-alias';
}
if(symbol.flags & ts.SymbolFlags.FunctionScopedVariable) {
return 'var';
}
if(symbol.flags & ts.SymbolFlags.BlockScopedVariable) {
return getBlockScopedVariableDocType(symbol);
}
log.warn('getExportDocType(): Unknown symbol type', {
symbolName: symbol.name,