Merge pull request #8843 from Microsoft/navbar_type_alias

Include type aliases as childItems in navigation bar
This commit is contained in:
Andy 2016-05-26 12:55:20 -07:00
commit 20fd4ddc8c
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");