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

Function captureLexicalThis

test/fixtures/snapshot/typescript.js:71898–71907  ·  view source on GitHub ↗
(node, container)

Source from the content-addressed store, hash-verified

71896 return !!ts.findAncestor(current, function (n) { return n === container ? "quit" : n === container.statement; });
71897 }
71898 function captureLexicalThis(node, container) {
71899 getNodeLinks(node).flags |= 2 /* NodeCheckFlags.LexicalThis */;
71900 if (container.kind === 167 /* SyntaxKind.PropertyDeclaration */ || container.kind === 171 /* SyntaxKind.Constructor */) {
71901 var classNode = container.parent;
71902 getNodeLinks(classNode).flags |= 4 /* NodeCheckFlags.CaptureThis */;
71903 }
71904 else {
71905 getNodeLinks(container).flags |= 4 /* NodeCheckFlags.CaptureThis */;
71906 }
71907 }
71908 function findFirstSuperCall(node) {
71909 return ts.isSuperCall(node) ? node :
71910 ts.isFunctionLike(node) ? undefined :

Callers 3

checkThisExpressionFunction · 0.85
checkSuperExpressionFunction · 0.85

Calls 1

getNodeLinksFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…