MCPcopy Create free account
hub / github.com/nodejs/node / substituteThisKeyword

Function substituteThisKeyword

test/fixtures/snapshot/typescript.js:101608–101614  ·  view source on GitHub ↗

* Substitutes `this` when contained within an arrow function. * * @param node The ThisKeyword node.

(node)

Source from the content-addressed store, hash-verified

101606 * @param node The ThisKeyword node.
101607 */
101608 function substituteThisKeyword(node) {
101609 if (enabledSubstitutions & 1 /* ES2015SubstitutionFlags.CapturedThis */
101610 && hierarchyFacts & 16 /* HierarchyFacts.CapturesThis */) {
101611 return ts.setTextRange(factory.createUniqueName("_this", 16 /* GeneratedIdentifierFlags.Optimistic */ | 32 /* GeneratedIdentifierFlags.FileLevel */), node);
101612 }
101613 return node;
101614 }
101615 function getClassMemberPrefix(node, member) {
101616 return ts.isStatic(member)
101617 ? factory.getInternalName(node)

Callers 1

substituteExpressionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected