Skip to content

Commit 3c1af1f

Browse files
author
Joseph Watts
committed
Fix display of private names in language server
Signed-off-by: Joseph Watts <[email protected]>
1 parent ce7016e commit 3c1af1f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/compiler/checker.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4528,7 +4528,10 @@ namespace ts {
45284528
context.flags ^= NodeBuilderFlags.InInitialEntityName;
45294529
}
45304530
let firstChar = symbolName.charCodeAt(0);
4531-
const canUsePropertyAccess = isIdentifierStart(firstChar, languageVersion);
4531+
const canUsePropertyAccess = firstChar === CharacterCodes.hash ?
4532+
symbolName.length > 1 && isIdentifierStart(symbolName.charCodeAt(1), languageVersion) :
4533+
isIdentifierStart(firstChar, languageVersion);
4534+
45324535
if (index === 0 || canUsePropertyAccess) {
45334536
const identifier = setEmitFlags(createIdentifier(symbolName, typeParameterNodes), EmitFlags.NoAsciiEscaping);
45344537
identifier.symbol = symbol;

0 commit comments

Comments
 (0)