* If we visit a private name, this means it is an undeclared private name. * Replace it with an empty identifier to indicate a problem with the code, * unless we are in a statement position - otherwise this will not trigger * a SyntaxError.
(node)
| 94422 | * a SyntaxError. |
| 94423 | */ |
| 94424 | function visitPrivateIdentifier(node) { |
| 94425 | if (!shouldTransformPrivateElementsOrClassStaticBlocks) { |
| 94426 | return node; |
| 94427 | } |
| 94428 | if (ts.isStatement(node.parent)) { |
| 94429 | return node; |
| 94430 | } |
| 94431 | return ts.setOriginalNode(factory.createIdentifier(""), node); |
| 94432 | } |
| 94433 | /** |
| 94434 | * Visits `#id in expr` |
| 94435 | */ |