Include type aliases as childItems in navigation bar

This commit is contained in:
Andy Hanson 2016-05-26 12:18:19 -07:00
parent 8aa6a9dcd6
commit fdd5c06b63
2 changed files with 5 additions and 1 deletions

View File

@ -104,6 +104,7 @@ namespace ts.NavigationBar {
case SyntaxKind.ImportEqualsDeclaration:
case SyntaxKind.ImportSpecifier:
case SyntaxKind.ExportSpecifier:
case SyntaxKind.TypeAliasDeclaration:
childNodes.push(node);
break;
}
@ -326,6 +327,8 @@ namespace ts.NavigationBar {
case SyntaxKind.InterfaceDeclaration:
return createItem(node, getTextOfNode((<InterfaceDeclaration>node).name), ts.ScriptElementKind.interfaceElement);
case SyntaxKind.TypeAliasDeclaration:
return createItem(node, getTextOfNode((<TypeAliasDeclaration>node).name), ts.ScriptElementKind.typeElement);
case SyntaxKind.CallSignature:
return createItem(node, "()", ts.ScriptElementKind.callSignatureElement);

View File

@ -2,5 +2,6 @@
////type T = number | string;
verify.navigationBarCount(1);
verify.navigationBarCount(3);
verify.navigationBarContains("T", "type");
verify.navigationBarChildItem("<global>", "T", "type");