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

Function getCalledExpression

test/fixtures/snapshot/typescript.js:161110–161119  ·  view source on GitHub ↗
(scope, range, functionNameText)

Source from the content-addressed store, hash-verified

161108 || ts.compareValues(type1.id, type2.id);
161109 }
161110 function getCalledExpression(scope, range, functionNameText) {
161111 var functionReference = ts.factory.createIdentifier(functionNameText);
161112 if (ts.isClassLike(scope)) {
161113 var lhs = range.facts & RangeFacts.InStaticRegion ? ts.factory.createIdentifier(scope.name.text) : ts.factory.createThis(); // TODO: GH#18217
161114 return ts.factory.createPropertyAccessExpression(lhs, functionReference);
161115 }
161116 else {
161117 return functionReference;
161118 }
161119 }
161120 function transformFunctionBody(body, exposedVariableDeclarations, writes, substitutions, hasReturn) {
161121 var hasWritesOrVariableDeclarations = writes !== undefined || exposedVariableDeclarations.length > 0;
161122 if (ts.isBlock(body) && !hasWritesOrVariableDeclarations && substitutions.size === 0) {

Callers 1

extractFunctionInScopeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…