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

Function getCandidateForOverloadFailure

test/fixtures/snapshot/typescript.js:76323–76332  ·  view source on GitHub ↗
(node, candidates, args, hasCandidatesOutArray, checkMode)

Source from the content-addressed store, hash-verified

76321 }
76322 // No signature was applicable. We have already reported the errors for the invalid signature.
76323 function getCandidateForOverloadFailure(node, candidates, args, hasCandidatesOutArray, checkMode) {
76324 ts.Debug.assert(candidates.length > 0); // Else should not have called this.
76325 checkNodeDeferred(node);
76326 // Normally we will combine overloads. Skip this if they have type parameters since that's hard to combine.
76327 // Don't do this if there is a `candidatesOutArray`,
76328 // because then we want the chosen best candidate to be one of the overloads, not a combination.
76329 return hasCandidatesOutArray || candidates.length === 1 || candidates.some(function (c) { return !!c.typeParameters; })
76330 ? pickLongestCandidateSignature(node, candidates, args, checkMode)
76331 : createUnionOfSignaturesForOverloadFailure(candidates);
76332 }
76333 function createUnionOfSignaturesForOverloadFailure(candidates) {
76334 var thisParameters = ts.mapDefined(candidates, function (c) { return c.thisParameter; });
76335 var thisParameter;

Callers 1

resolveCallFunction · 0.85

Calls 5

checkNodeDeferredFunction · 0.85
assertMethod · 0.80
someMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…