Skip to content

Commit 2876b3c

Browse files
committed
No weak type checks with comparable relation
1 parent 3e4b83e commit 2876b3c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8815,7 +8815,8 @@ namespace ts {
88158815
}
88168816
}
88178817

8818-
if (!(source.flags & TypeFlags.UnionOrIntersection) &&
8818+
if (relation !== comparableRelation &&
8819+
!(source.flags & TypeFlags.UnionOrIntersection) &&
88198820
!(target.flags & TypeFlags.Union) &&
88208821
!isIntersectionConstituent &&
88218822
source !== globalObjectType &&

0 commit comments

Comments
 (0)