Skip to content

Commit 85fea55

Browse files
committed
Add missing BinaryExpression tokens
1 parent 6557da1 commit 85fea55

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/graphqlsp/src/ast/declaration.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@ export function getValueOfValueDeclaration(
9999
case ts.SyntaxKind.VariableDeclaration:
100100
return node.initializer;
101101
case ts.SyntaxKind.BinaryExpression:
102-
return node.operatorToken.kind === ts.SyntaxKind.EqualsToken
102+
return node.operatorToken.kind === ts.SyntaxKind.EqualsToken ||
103+
node.operatorToken.kind === ts.SyntaxKind.BarBarEqualsToken ||
104+
node.operatorToken.kind ===
105+
ts.SyntaxKind.AmpersandAmpersandEqualsToken ||
106+
node.operatorToken.kind === ts.SyntaxKind.QuestionQuestionEqualsToken
103107
? node.right
104108
: undefined;
105109
case ts.SyntaxKind.ShorthandPropertyAssignment:

0 commit comments

Comments
 (0)