fix(54954): Javascript Intellisense adding "this." to function declaration (#55119)

This commit is contained in:
Oleksandr T
2023-08-04 01:57:51 +03:00
committed by GitHub
parent 607d96f6df
commit d045f18928
3 changed files with 265 additions and 0 deletions

View File

@@ -5298,6 +5298,11 @@ function tryGetObjectTypeDeclarationCompletionContainer(sourceFile: SourceFile,
return cls;
}
break;
case SyntaxKind.PrivateIdentifier:
if (tryCast(location.parent, isPropertyDeclaration)) {
return findAncestor(location, isClassLike);
}
break;
case SyntaxKind.Identifier: {
const originalKeywordKind = identifierToKeywordKind(location as Identifier);
if (originalKeywordKind) {