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

Function setNodeLinksForPrivateIdentifierScope

test/fixtures/snapshot/typescript.js:80462–80478  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

80460 setNodeLinksForPrivateIdentifierScope(node);
80461 }
80462 function setNodeLinksForPrivateIdentifierScope(node) {
80463 if (ts.isPrivateIdentifier(node.name) && languageVersion < 99 /* ScriptTarget.ESNext */) {
80464 for (var lexicalScope = ts.getEnclosingBlockScopeContainer(node); !!lexicalScope; lexicalScope = ts.getEnclosingBlockScopeContainer(lexicalScope)) {
80465 getNodeLinks(lexicalScope).flags |= 67108864 /* NodeCheckFlags.ContainsClassWithPrivateIdentifiers */;
80466 }
80467 // If this is a private element in a class expression inside the body of a loop,
80468 // then we must use a block-scoped binding to store the additional variables required
80469 // to transform private elements.
80470 if (ts.isClassExpression(node.parent)) {
80471 var enclosingIterationStatement = getEnclosingIterationStatement(node.parent);
80472 if (enclosingIterationStatement) {
80473 getNodeLinks(node.name).flags |= 524288 /* NodeCheckFlags.BlockScopedBindingInLoop */;
80474 getNodeLinks(enclosingIterationStatement).flags |= 65536 /* NodeCheckFlags.LoopWithCapturedBlockScopedBinding */;
80475 }
80476 }
80477 }
80478 }
80479 function checkClassStaticBlockDeclaration(node) {
80480 checkGrammarDecoratorsAndModifiers(node);
80481 ts.forEachChild(node, checkSourceElement);

Callers 3

checkPropertyDeclarationFunction · 0.85
checkMethodDeclarationFunction · 0.85
checkAccessorDeclarationFunction · 0.85

Calls 2

getNodeLinksFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…