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

Function tryGetSignatureDeclaration

test/fixtures/snapshot/typescript.js:140100–140105  ·  view source on GitHub ↗
(typeChecker, node)

Source from the content-addressed store, hash-verified

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);
140103 // Don't go to a function type, go to the value having that type.
140104 return ts.tryCast(signature && signature.declaration, function (d) { return ts.isFunctionLike(d) && !ts.isFunctionTypeNode(d); });
140105 }
140106 function isConstructorLike(node) {
140107 switch (node.kind) {
140108 case 171 /* SyntaxKind.Constructor */:

Callers 1

getDefinitionAtPositionFunction · 0.85

Calls 1

Tested by

no test coverage detected