Always cache union and intersection relations
This commit is contained in:
parent
8c278bf5ab
commit
6499302983
|
@ -18207,7 +18207,7 @@ namespace ts {
|
|||
let result = Ternary.False;
|
||||
const saveErrorInfo = captureErrorCalculationState();
|
||||
|
||||
if ((source.flags & TypeFlags.Union || target.flags & TypeFlags.Union) && getConstituentCount(source) * getConstituentCount(target) < 4) {
|
||||
if ((source.flags & TypeFlags.Union || target.flags & TypeFlags.Union) && getConstituentCount(source) * getConstituentCount(target) < 0) {
|
||||
// We skip caching when source or target is a union with no more than three constituents.
|
||||
result = structuredTypeRelatedTo(source, target, reportErrors, intersectionState | IntersectionState.UnionIntersectionCheck);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue