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

Function inferTypeFromContextualType

test/fixtures/snapshot/typescript.js:157072–157076  ·  view source on GitHub ↗
(node, usage)

Source from the content-addressed store, hash-verified

157070 }
157071 }
157072 function inferTypeFromContextualType(node, usage) {
157073 if (ts.isExpressionNode(node)) {
157074 addCandidateType(usage, checker.getContextualType(node));
157075 }
157076 }
157077 function inferTypeFromExpressionStatement(node, usage) {
157078 addCandidateType(usage, ts.isCallExpression(node) ? checker.getVoidType() : checker.getAnyType());
157079 }

Callers 1

calculateUsageOfNodeFunction · 0.85

Calls 1

addCandidateTypeFunction · 0.85

Tested by

no test coverage detected