(node)
| 95799 | return ts.visitNode(node, visitorDestructuringTarget); |
| 95800 | } |
| 95801 | function visitObjectAssignmentTarget(node) { |
| 95802 | if (ts.isObjectBindingOrAssignmentElement(node) && !ts.isShorthandPropertyAssignment(node)) { |
| 95803 | var target = ts.getTargetOfBindingOrAssignmentElement(node); |
| 95804 | var wrapped = void 0; |
| 95805 | if (target) { |
| 95806 | if (ts.isPrivateIdentifierPropertyAccessExpression(target)) { |
| 95807 | wrapped = wrapPrivateIdentifierForDestructuringTarget(target); |
| 95808 | } |
| 95809 | else if (shouldTransformSuperInStaticInitializers && |
| 95810 | ts.isSuperProperty(target) && |
| 95811 | currentStaticPropertyDeclarationOrStaticBlock && |
| 95812 | currentClassLexicalEnvironment) { |
| 95813 | var classConstructor = currentClassLexicalEnvironment.classConstructor, superClassReference = currentClassLexicalEnvironment.superClassReference, facts = currentClassLexicalEnvironment.facts; |
| 95814 | if (facts & 1 /* ClassFacts.ClassWasDecorated */) { |
| 95815 | wrapped = visitInvalidSuperProperty(target); |
| 95816 | } |
| 95817 | else if (classConstructor && superClassReference) { |
| 95818 | var name = ts.isElementAccessExpression(target) ? ts.visitNode(target.argumentExpression, visitor, ts.isExpression) : |
| 95819 | ts.isIdentifier(target.name) ? factory.createStringLiteralFromNode(target.name) : |
| 95820 | undefined; |
| 95821 | if (name) { |
| 95822 | var temp = factory.createTempVariable(/*recordTempVariable*/ undefined); |
| 95823 | wrapped = factory.createAssignmentTargetWrapper(temp, factory.createReflectSetCall(superClassReference, name, temp, classConstructor)); |
| 95824 | } |
| 95825 | } |
| 95826 | } |
| 95827 | } |
| 95828 | if (ts.isPropertyAssignment(node)) { |
| 95829 | var initializer = ts.getInitializerOfBindingOrAssignmentElement(node); |
| 95830 | return factory.updatePropertyAssignment(node, ts.visitNode(node.name, visitor, ts.isPropertyName), wrapped ? |
| 95831 | initializer ? factory.createAssignment(wrapped, ts.visitNode(initializer, visitor)) : wrapped : |
| 95832 | ts.visitNode(node.initializer, visitorDestructuringTarget, ts.isExpression)); |
| 95833 | } |
| 95834 | if (ts.isSpreadAssignment(node)) { |
| 95835 | return factory.updateSpreadAssignment(node, wrapped || ts.visitNode(node.expression, visitorDestructuringTarget, ts.isExpression)); |
| 95836 | } |
| 95837 | ts.Debug.assert(wrapped === undefined, "Should not have generated a wrapped target"); |
| 95838 | } |
| 95839 | return ts.visitNode(node, visitor); |
| 95840 | } |
| 95841 | function visitAssignmentPattern(node) { |
| 95842 | if (ts.isArrayLiteralExpression(node)) { |
| 95843 | // Transforms private names in destructuring assignment array bindings. |
nothing calls this directly
no test coverage detected