File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -566,7 +566,7 @@ namespace ts.NavigationBar {
566566 }
567567
568568 // Add a level if traversing into a container
569- if ( isFunctionLike ( node ) || isClassLike ( node ) ) {
569+ if ( newItem && ( isFunctionLike ( node ) || isClassLike ( node ) ) ) {
570570 const lastTop = topItem ;
571571 indent ++ ;
572572 topItem = newItem ;
@@ -606,6 +606,7 @@ namespace ts.NavigationBar {
606606 case SyntaxKind . Constructor :
607607 case SyntaxKind . GetAccessor :
608608 case SyntaxKind . SetAccessor :
609+ // "export default function().." looks just like a regular function/class declaration, except with the 'default' flag set
609610 const name = node . flags && ( node . flags & NodeFlags . Default ) ? "default" :
610611 node . kind === SyntaxKind . Constructor ? "constructor" :
611612 declarationNameToString ( ( node as ( Declaration ) ) . name ) ;
@@ -633,6 +634,7 @@ namespace ts.NavigationBar {
633634 ScriptElementKind . memberFunctionElement ,
634635 [ getNodeSpan ( node ) ] ) ;
635636 case SyntaxKind . ExportAssignment :
637+ // e.g. "export default <expr>"
636638 return getNavBarItem ( "default" , ScriptElementKind . variableElement , [ getNodeSpan ( node ) ] ) ;
637639 case SyntaxKind . ImportClause : // e.g. 'def' in: import def from 'mod' (in ImportDeclaration)
638640 if ( ! ( node as ImportClause ) . name ) {
You can’t perform that action at this time.
0 commit comments