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

Function getAncestorCallLikeExpression

test/fixtures/snapshot/typescript.js:140095–140099  ·  view source on GitHub ↗

Returns a CallLikeExpression where `node` is the target being invoked.

(node)

Source from the content-addressed store, hash-verified

140093 }
140094 /** Returns a CallLikeExpression where `node` is the target being invoked. */
140095 function getAncestorCallLikeExpression(node) {
140096 var target = ts.findAncestor(node, function (n) { return !ts.isRightSideOfPropertyAccess(n); });
140097 var callLike = target === null || target === void 0 ? void 0 : target.parent;
140098 return callLike && ts.isCallLikeExpression(callLike) && ts.getInvokedExpression(callLike) === target ? callLike : undefined;
140099 }
140100 function tryGetSignatureDeclaration(typeChecker, node) {
140101 var callLike = getAncestorCallLikeExpression(node);
140102 var signature = callLike && typeChecker.getResolvedSignature(callLike);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected