mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 06:41:59 -06:00
Specifically test for 'void' to permit implementations to return more than what was guaranteed.
This commit is contained in:
parent
069fada0ce
commit
9b507b7512
@ -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…
x
Reference in New Issue
Block a user