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

Function getThisArgumentOfCall

test/fixtures/snapshot/typescript.js:75787–75796  ·  view source on GitHub ↗

* Returns the this argument in calls like x.f(...) and x[f](...). Undefined otherwise.

(node)

Source from the content-addressed store, hash-verified

75785 * Returns the this argument in calls like x.f(...) and x[f](...). Undefined otherwise.
75786 */
75787 function getThisArgumentOfCall(node) {
75788 var expression = node.kind === 208 /* SyntaxKind.CallExpression */ ? node.expression :
75789 node.kind === 210 /* SyntaxKind.TaggedTemplateExpression */ ? node.tag : undefined;
75790 if (expression) {
75791 var callee = ts.skipOuterExpressions(expression);
75792 if (ts.isAccessExpression(callee)) {
75793 return callee.expression;
75794 }
75795 }
75796 }
75797 function createSyntheticExpression(parent, type, isSpread, tupleNameSource) {
75798 var result = ts.parseNodeFactory.createSyntheticExpression(type, isSpread, tupleNameSource);
75799 ts.setTextRange(result, parent);

Callers 2

inferTypeArgumentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected