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

Function inferTypeFromCallExpression

test/fixtures/snapshot/typescript.js:157196–157214  ·  view source on GitHub ↗
(parent, usage)

Source from the content-addressed store, hash-verified

157194 addCandidateType(usage, checker.getTypeAtLocation(parent.parent.parent.expression));
157195 }
157196 function inferTypeFromCallExpression(parent, usage) {
157197 var call = {
157198 argumentTypes: [],
157199 return_: createEmptyUsage()
157200 };
157201 if (parent.arguments) {
157202 for (var _i = 0, _a = parent.arguments; _i < _a.length; _i++) {
157203 var argument = _a[_i];
157204 call.argumentTypes.push(checker.getTypeAtLocation(argument));
157205 }
157206 }
157207 calculateUsageOfNode(parent, call.return_);
157208 if (parent.kind === 208 /* SyntaxKind.CallExpression */) {
157209 (usage.calls || (usage.calls = [])).push(call);
157210 }
157211 else {
157212 (usage.constructs || (usage.constructs = [])).push(call);
157213 }
157214 }
157215 function inferTypeFromPropertyAccessExpression(parent, usage) {
157216 var name = ts.escapeLeadingUnderscores(parent.name.text);
157217 if (!usage.properties) {

Callers 1

calculateUsageOfNodeFunction · 0.85

Calls 3

createEmptyUsageFunction · 0.85
calculateUsageOfNodeFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected