Skip to content

Commit 22bfc60

Browse files
Joseph Wattsmheiber
authored andcommitted
Fix display of private names in language server
Signed-off-by: Joseph Watts <[email protected]>
1 parent 3f62dcb commit 22bfc60

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
@@ -4364,7 +4364,10 @@ namespace ts {
43644364
context.flags ^= NodeBuilderFlags.InInitialEntityName;
43654365
}
43664366
let firstChar = symbolName.charCodeAt(0);
4367-
const canUsePropertyAccess = isIdentifierStart(firstChar, languageVersion);
4367+
const canUsePropertyAccess = firstChar === CharacterCodes.hash ?
4368+
symbolName.length > 1 && isIdentifierStart(symbolName.charCodeAt(1), languageVersion) :
4369+
isIdentifierStart(firstChar, languageVersion);
4370+
43684371
if (index === 0 || canUsePropertyAccess) {
43694372
const identifier = setEmitFlags(createIdentifier(symbolName, typeParameterNodes), EmitFlags.NoAsciiEscaping);
43704373
identifier.symbol = symbol;

0 commit comments

Comments
 (0)