MCPcopy Index your code
hub / github.com/nodejs/node / visitPrivateIdentifier

Function visitPrivateIdentifier

test/fixtures/snapshot/typescript.js:94424–94432  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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 */

Callers 1

visitorWorkerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected