mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Merge pull request #8843 from Microsoft/navbar_type_alias
Include type aliases as childItems in navigation bar
This commit is contained in:
commit
20fd4ddc8c
@ -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);
|
||||
|
||||
@ -2,5 +2,6 @@
|
||||
|
||||
////type T = number | string;
|
||||
|
||||
verify.navigationBarCount(1);
|
||||
verify.navigationBarCount(3);
|
||||
verify.navigationBarContains("T", "type");
|
||||
verify.navigationBarChildItem("<global>", "T", "type");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user