Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Commit f29c462

Browse files
committed
Fix: Ensure exp. operator assignment is AssignmentExpression (fixes #355)
1 parent 67971de commit f29c462

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/convert.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,6 +1461,13 @@ module.exports = function convert(config) {
14611461
result.expressions.push(right);
14621462
}
14631463

1464+
} else if (node.operatorToken && node.operatorToken.kind === SyntaxKind.AsteriskAsteriskEqualsToken) {
1465+
Object.assign(result, {
1466+
type: AST_NODE_TYPES.AssignmentExpression,
1467+
operator: nodeUtils.getTextForTokenKind(node.operatorToken.kind),
1468+
left: convertChild(node.left),
1469+
right: convertChild(node.right)
1470+
});
14641471
} else {
14651472
Object.assign(result, {
14661473
type: nodeUtils.getBinaryExpressionType(node.operatorToken),

0 commit comments

Comments
 (0)