fix(38463): show completions for index access properties

This commit is contained in:
Alexander T
2020-05-11 21:44:48 +03:00
parent 5653cecc17
commit 1c72da6e49
3 changed files with 31 additions and 3 deletions

View File

@@ -223,9 +223,7 @@ namespace ts.Completions.StringCompletions {
function stringLiteralCompletionsFromProperties(type: Type | undefined): StringLiteralCompletionsFromProperties | undefined {
return type && {
kind: StringLiteralCompletionKind.Properties,
symbols: type.getApparentProperties().filter(prop =>
!isPrivateIdentifierPropertyDeclaration(
isTransientSymbol(prop) && prop.syntheticOrigin ? prop.syntheticOrigin.valueDeclaration : prop.valueDeclaration)),
symbols: filter(type.getApparentProperties(), prop => !(prop.valueDeclaration && isPrivateIdentifierPropertyDeclaration(prop.valueDeclaration))),
hasIndexSignature: hasIndexSignature(type)
};
}