Skip to content

Commit 8bd4821

Browse files
committed
default to printing 'namespace' instead of 'module'
1 parent fb7762c commit 8bd4821

File tree

34 files changed

+213
-213
lines changed

34 files changed

+213
-213
lines changed

src/services/symbolDisplay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(
510510
prefixNextMeaning();
511511
if (!tryUnfoldSymbol(symbol, semanticMeaning)) {
512512
const declaration = getDeclarationOfKind<ModuleDeclaration>(symbol, SyntaxKind.ModuleDeclaration);
513-
const isNamespace = declaration && declaration.name && declaration.name.kind === SyntaxKind.Identifier;
513+
const isNamespace = !(declaration && declaration.name && declaration.name.kind === SyntaxKind.StringLiteral);
514514
displayParts.push(keywordPart(isNamespace ? SyntaxKind.NamespaceKeyword : SyntaxKind.ModuleKeyword));
515515
displayParts.push(spacePart());
516516
addFullSymbolName(symbol);

tests/baselines/reference/completionNoParentLocation.baseline

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
// | function
5858
// | interface Function
5959
// | var Function: FunctionConstructor
60-
// | module globalThis
60+
// | namespace globalThis
6161
// | if
6262
// | implements
6363
// | import
@@ -1651,7 +1651,7 @@
16511651
"sortText": "15",
16521652
"displayParts": [
16531653
{
1654-
"text": "module",
1654+
"text": "namespace",
16551655
"kind": "keyword"
16561656
},
16571657
{

tests/baselines/reference/completionsCommentsClass.baseline

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
// | function
110110
// | interface Function
111111
// | var Function: FunctionConstructor
112-
// | module globalThis
112+
// | namespace globalThis
113113
// | if
114114
// | implements
115115
// | import
@@ -2242,7 +2242,7 @@
22422242
"sortText": "15",
22432243
"displayParts": [
22442244
{
2245-
"text": "module",
2245+
"text": "namespace",
22462246
"kind": "keyword"
22472247
},
22482248
{

0 commit comments

Comments
 (0)