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

Function substituteThisExpression

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

Source from the content-addressed store, hash-verified

95492 return node;
95493 }
95494 function substituteThisExpression(node) {
95495 if (enabledSubstitutions & 2 /* ClassPropertySubstitutionFlags.ClassStaticThisOrSuperReference */ && currentClassLexicalEnvironment) {
95496 var facts = currentClassLexicalEnvironment.facts, classConstructor = currentClassLexicalEnvironment.classConstructor;
95497 if (facts & 1 /* ClassFacts.ClassWasDecorated */) {
95498 return factory.createParenthesizedExpression(factory.createVoidZero());
95499 }
95500 if (classConstructor) {
95501 return ts.setTextRange(ts.setOriginalNode(factory.cloneNode(classConstructor), node), node);
95502 }
95503 }
95504 return node;
95505 }
95506 function substituteExpressionIdentifier(node) {
95507 return trySubstituteClassAlias(node) || node;
95508 }

Callers 1

substituteExpressionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected