(node)
| 94493 | return node; |
| 94494 | } |
| 94495 | function visitMethodOrAccessorDeclaration(node) { |
| 94496 | ts.Debug.assert(!ts.some(node.decorators)); |
| 94497 | if (!shouldTransformPrivateElementsOrClassStaticBlocks || !ts.isPrivateIdentifier(node.name)) { |
| 94498 | return ts.visitEachChild(node, classElementVisitor, context); |
| 94499 | } |
| 94500 | // leave invalid code untransformed |
| 94501 | var info = accessPrivateIdentifier(node.name); |
| 94502 | ts.Debug.assert(info, "Undeclared private name for property declaration."); |
| 94503 | if (!info.isValid) { |
| 94504 | return node; |
| 94505 | } |
| 94506 | var functionName = getHoistedFunctionName(node); |
| 94507 | if (functionName) { |
| 94508 | getPendingExpressions().push(factory.createAssignment(functionName, factory.createFunctionExpression(ts.filter(node.modifiers, function (m) { return !ts.isStaticModifier(m); }), node.asteriskToken, functionName, |
| 94509 | /* typeParameters */ undefined, ts.visitParameterList(node.parameters, classElementVisitor, context), |
| 94510 | /* type */ undefined, ts.visitFunctionBody(node.body, classElementVisitor, context)))); |
| 94511 | } |
| 94512 | // remove method declaration from class |
| 94513 | return undefined; |
| 94514 | } |
| 94515 | function getHoistedFunctionName(node) { |
| 94516 | ts.Debug.assert(ts.isPrivateIdentifier(node.name)); |
| 94517 | var info = accessPrivateIdentifier(node.name); |
no test coverage detected