Merge pull request #32077 from andrewbranch/bug/31114

Fix incorrect noImplicitAny error on contextual union function signature
This commit is contained in:
Andrew Branch
2019-07-03 10:10:10 -07:00
committed by GitHub
5 changed files with 41 additions and 1 deletions

View File

@@ -19129,7 +19129,9 @@ namespace ts {
}
}
// Result is union of signatures collected (return type is union of return types of this signature set)
return signatureList && createUnionSignature(signatureList[0], signatureList);
if (signatureList) {
return signatureList.length === 1 ? signatureList[0] : createUnionSignature(signatureList[0], signatureList);
}
}
function checkSpreadExpression(node: SpreadElement, checkMode?: CheckMode): Type {