diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 162c40e108a..8dca2ac0d0b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8665,7 +8665,7 @@ namespace ts { // type. Otherwise, the types are completely unrelated, so narrow to an intersection of the // two types. const targetType = type.flags & TypeFlags.TypeParameter ? getApparentType(type) : type; - return isTypeSubtypeOf(candidate, targetType) ? candidate : + return isTypeSubtypeOf(candidate, type) ? candidate : isTypeAssignableTo(type, candidate) ? type : isTypeAssignableTo(candidate, targetType) ? candidate : getIntersectionType([type, candidate]);