Specifically test for 'void' to permit implementations to return more than what was guaranteed.
This commit is contained in:
parent
069fada0ce
commit
9b507b7512
1 changed files with 2 additions and 1 deletions
|
@ -4987,7 +4987,8 @@ namespace ts {
|
|||
|
||||
const sourceReturnType = getReturnTypeOfSignature(erasedSource);
|
||||
const targetReturnType = getReturnTypeOfSignature(erasedTarget);
|
||||
if (checkTypeRelatedTo(sourceReturnType, targetReturnType, assignableRelation, /*errorNode*/ undefined)
|
||||
if (targetReturnType === voidType
|
||||
|| checkTypeRelatedTo(sourceReturnType, targetReturnType, assignableRelation, /*errorNode*/ undefined)
|
||||
|| checkTypeRelatedTo(targetReturnType, sourceReturnType, assignableRelation, /*errorNode*/ undefined)) {
|
||||
const anyReturningSource = cloneSignature(erasedSource);
|
||||
const anyReturningTarget = cloneSignature(erasedTarget);
|
||||
|
|
Loading…
Reference in a new issue