Skip to content

Commit d0b7ec8

Browse files
committed
Remove special case for Function type
1 parent 39326d7 commit d0b7ec8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25061,7 +25061,7 @@ namespace ts {
2506125061
if (!areTypesComparable(t, c)) {
2506225062
return neverType;
2506325063
}
25064-
if ((c.flags & TypeFlags.Primitive || c === globalFunctionType) && t.flags & TypeFlags.Object && !isEmptyAnonymousObjectType(t)) {
25064+
if ((c.flags & TypeFlags.Primitive) && t.flags & TypeFlags.Object && !isEmptyAnonymousObjectType(t)) {
2506525065
return isTypeSubtypeOf(c, t) ? c : neverType;
2506625066
}
2506725067
return getIntersectionType([t, c]);

0 commit comments

Comments
 (0)