mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
addImplementationSuccessElaboration admits declarations with no symbol (#41758)
This commit is contained in:
@@ -27483,9 +27483,9 @@ namespace ts {
|
||||
const oldCandidateForArgumentArityError = candidateForArgumentArityError;
|
||||
const oldCandidateForTypeArgumentError = candidateForTypeArgumentError;
|
||||
|
||||
const declCount = length(failed.declaration?.symbol.declarations);
|
||||
const isOverload = declCount > 1;
|
||||
const implDecl = isOverload ? find(failed.declaration?.symbol.declarations || emptyArray, d => isFunctionLikeDeclaration(d) && nodeIsPresent(d.body)) : undefined;
|
||||
const failedSignatureDeclarations = failed.declaration?.symbol?.declarations || emptyArray;
|
||||
const isOverload = failedSignatureDeclarations.length > 1;
|
||||
const implDecl = isOverload ? find(failedSignatureDeclarations, d => isFunctionLikeDeclaration(d) && nodeIsPresent(d.body)) : undefined;
|
||||
if (implDecl) {
|
||||
const candidate = getSignatureFromDeclaration(implDecl as FunctionLikeDeclaration);
|
||||
const isSingleNonGenericCandidate = !candidate.typeParameters;
|
||||
|
||||
Reference in New Issue
Block a user