File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ namespace ts.NavigationBar {
176
176
break ;
177
177
case SyntaxKind . EnumDeclaration :
178
178
case SyntaxKind . InterfaceDeclaration :
179
+ case SyntaxKind . TypeAliasDeclaration :
179
180
topLevelNodes . push ( node ) ;
180
181
break ;
181
182
@@ -422,6 +423,9 @@ namespace ts.NavigationBar {
422
423
423
424
case SyntaxKind . FunctionDeclaration :
424
425
return createFunctionItem ( < FunctionDeclaration > node ) ;
426
+
427
+ case SyntaxKind . TypeAliasDeclaration :
428
+ return createTypeAliasItem ( < TypeAliasDeclaration > node ) ;
425
429
}
426
430
427
431
return undefined ;
@@ -474,6 +478,15 @@ namespace ts.NavigationBar {
474
478
return undefined ;
475
479
}
476
480
481
+ function createTypeAliasItem ( node : TypeAliasDeclaration ) : ts . NavigationBarItem {
482
+ return getNavigationBarItem ( node . name . text ,
483
+ ts . ScriptElementKind . typeElement ,
484
+ getNodeModifiers ( node ) ,
485
+ [ getNodeSpan ( node ) ] ,
486
+ [ ] ,
487
+ getIndent ( node ) ) ;
488
+ }
489
+
477
490
function createMemberFunctionLikeItem ( node : MethodDeclaration | ConstructorDeclaration ) : ts . NavigationBarItem {
478
491
if ( node . body && node . body . kind === SyntaxKind . Block ) {
479
492
let childItems = getItemsWorker ( sortNodes ( ( < Block > node . body ) . statements ) , createChildItem ) ;
Original file line number Diff line number Diff line change
1
+ /// <reference path="fourslash.ts"/>
2
+
3
+ ////type T = number | string;
4
+
5
+ verify . navigationBarCount ( 1 ) ;
6
+ verify . navigationBarContains ( "T" , "type" ) ;
You can’t perform that action at this time.
0 commit comments