Skip to content

Commit

Permalink
remove the dumdum bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Oct 29, 2024
1 parent e481b75 commit b4ff1a0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/services/stringCompletions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,7 @@ function getStringLiteralCompletionEntries(sourceFile: SourceFile, node: StringL
return { kind: StringLiteralCompletionKind.Properties, symbols: uniques, hasIndexSignature: false };
case SyntaxKind.BinaryExpression:
if ((parent as BinaryExpression).operatorToken.kind === SyntaxKind.InKeyword) {
const { left, right } = parent as BinaryExpression;
const leftOrRight = findAncestor(node, n => n.parent.kind === SyntaxKind.BinaryExpression);
const type = typeChecker.getTypeAtLocation(leftOrRight === right ? left : right);
const type = typeChecker.getTypeAtLocation((parent as BinaryExpression).right);
const properties = type.isUnion() ? typeChecker.getAllPossiblePropertiesOfTypes(type.types) : type.getApparentProperties();
return {
kind: StringLiteralCompletionKind.Properties,
Expand Down

0 comments on commit b4ff1a0

Please sign in to comment.