Skip to content

Commit 738b40e

Browse files
Joseph Wattsmheiber
authored andcommitted
Fix display of private names in language server
Signed-off-by: Joseph Watts <jwatts43@bloomberg.net>
1 parent fccbbca commit 738b40e

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
@@ -4408,7 +4408,10 @@ namespace ts {
44084408
context.flags ^= NodeBuilderFlags.InInitialEntityName;
44094409
}
44104410
let firstChar = symbolName.charCodeAt(0);
4411-
const canUsePropertyAccess = isIdentifierStart(firstChar, languageVersion);
4411+
const canUsePropertyAccess = firstChar === CharacterCodes.hash ?
4412+
symbolName.length > 1 && isIdentifierStart(symbolName.charCodeAt(1), languageVersion) :
4413+
isIdentifierStart(firstChar, languageVersion);
4414+
44124415
if (index === 0 || canUsePropertyAccess) {
44134416
const identifier = setEmitFlags(createIdentifier(symbolName, typeParameterNodes), EmitFlags.NoAsciiEscaping);
44144417
identifier.symbol = symbol;

0 commit comments

Comments
 (0)