(node, candidates, args, hasCandidatesOutArray, checkMode)
| 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; |
no test coverage detected
searching dependent graphs…