mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-16 07:13:43 -05:00
Add missing type relationship for conditional types
This commit is contained in:
committed by
Mohamed Hegazy
parent
b2d702e423
commit
b4e83f5c12
@@ -10231,10 +10231,13 @@ namespace ts {
|
||||
if (result = isRelatedTo(getTrueTypeFromConditionalType(<ConditionalType>source), getTrueTypeFromConditionalType(<ConditionalType>target), reportErrors)) {
|
||||
result &= isRelatedTo(getFalseTypeFromConditionalType(<ConditionalType>source), getFalseTypeFromConditionalType(<ConditionalType>target), reportErrors);
|
||||
}
|
||||
if (result) {
|
||||
errorInfo = saveErrorInfo;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
else {
|
||||
result = isRelatedTo(getDefaultConstraintOfConditionalType(<ConditionalType>source), getDefaultConstraintOfConditionalType(<ConditionalType>target), reportErrors);
|
||||
}
|
||||
if (result) {
|
||||
errorInfo = saveErrorInfo;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
else if (relation !== definitelyAssignableRelation) {
|
||||
|
||||
Reference in New Issue
Block a user