mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 07:29:16 -05:00
Consistently avoid pulling on the source return type when the target return type is any (#47306)
This commit is contained in:
@@ -17903,7 +17903,7 @@ namespace ts {
|
||||
const targetReturnType = isResolvingReturnTypeOfSignature(target) ? anyType
|
||||
: target.declaration && isJSConstructor(target.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(target.declaration.symbol))
|
||||
: getReturnTypeOfSignature(target);
|
||||
if (targetReturnType === voidType) {
|
||||
if (targetReturnType === voidType || targetReturnType === anyType) {
|
||||
return result;
|
||||
}
|
||||
const sourceReturnType = isResolvingReturnTypeOfSignature(source) ? anyType
|
||||
|
||||
Reference in New Issue
Block a user