demo/typescript.js
function isAssignmentTarget(node) {
            var parent = node.parent;
            if (parent.kind === 181 /* BinaryExpression */ && parent.operatorToken.kind === 56 /* EqualsToken */ && parent.left === node) {
                return true;
            }
            if (parent.kind === 245 /* PropertyAssignment */) {
                return isAssignmentTarget(parent.parent);
            }
            if (parent.kind === 164 /* ArrayLiteralExpression */) {
                return isAssignmentTarget(parent);
            }
            return false;
        }
function isAssignmentTarget(node) {
            var parent = node.parent;
            if (parent.kind === 181 /* BinaryExpression */ && parent.operatorToken.kind === 56 /* EqualsToken */ && parent.left === node) {
                return true;
            }
            if (parent.kind === 245 /* PropertyAssignment */) {
                return isAssignmentTarget(parent.parent);
            }
            if (parent.kind === 164 /* ArrayLiteralExpression */) {
                return isAssignmentTarget(parent);
            }
            return false;
        }
A node is an assignment target if it is on the left hand side of an '=' token, if it is parented by a property assignment in an object literal that is an assignment target, or if it is parented by an array literal that is an assignment target. Examples include 'a = xxx', '{ p: a } = xxx', '[{ p: a}] = xxx'.