Skip to content

Commit 594ad64

Browse files
author
Andy
authored
Merge pull request #9442 from Microsoft/navigation_bar_nameless_namespace
Show "<unknown>" if the name of a declaration is unavailable
2 parents 07d7ec3 + 0535d55 commit 594ad64

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/services/navigationBar.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,7 @@ namespace ts.NavigationBar {
412412
case SyntaxKind.JSDocTypedefTag:
413413
return getJSDocTypedefTagName(<JSDocTypedefTag>node);
414414
default:
415-
Debug.fail();
416-
return "";
415+
return "<unknown>";
417416
}
418417
}
419418

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
////import *{} from 'foo';
2+
verify.navigationBar([
3+
{
4+
"text": "\"navigationBarNamespaceImportWithNoName\"",
5+
"kind": "module",
6+
"childItems": [
7+
{
8+
"text": "<unknown>",
9+
"kind": "alias"
10+
}
11+
]
12+
}
13+
]);

0 commit comments

Comments
 (0)