Reversed order of checks, since the implementation will typically be more general than the overload.
This commit is contained in:
parent
e012645309
commit
a236461358
1 changed files with 2 additions and 2 deletions
|
@ -4988,8 +4988,8 @@ namespace ts {
|
|||
const sourceReturnType = getReturnTypeOfSignature(erasedSource);
|
||||
const targetReturnType = getReturnTypeOfSignature(erasedTarget);
|
||||
if (targetReturnType === voidType
|
||||
|| checkTypeRelatedTo(sourceReturnType, targetReturnType, assignableRelation, /*errorNode*/ undefined)
|
||||
|| checkTypeRelatedTo(targetReturnType, sourceReturnType, assignableRelation, /*errorNode*/ undefined)) {
|
||||
|| checkTypeRelatedTo(targetReturnType, sourceReturnType, assignableRelation, /*errorNode*/ undefined)
|
||||
|| checkTypeRelatedTo(sourceReturnType, targetReturnType, assignableRelation, /*errorNode*/ undefined)) {
|
||||
const anyReturningSource = cloneSignature(erasedSource);
|
||||
const anyReturningTarget = cloneSignature(erasedTarget);
|
||||
anyReturningSource.resolvedReturnType = anyType;
|
||||
|
|
Loading…
Reference in a new issue