We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39326d7 commit d0b7ec8Copy full SHA for d0b7ec8
src/compiler/checker.ts
@@ -25061,7 +25061,7 @@ namespace ts {
25061
if (!areTypesComparable(t, c)) {
25062
return neverType;
25063
}
25064
- if ((c.flags & TypeFlags.Primitive || c === globalFunctionType) && t.flags & TypeFlags.Object && !isEmptyAnonymousObjectType(t)) {
+ if ((c.flags & TypeFlags.Primitive) && t.flags & TypeFlags.Object && !isEmptyAnonymousObjectType(t)) {
25065
return isTypeSubtypeOf(c, t) ? c : neverType;
25066
25067
return getIntersectionType([t, c]);
0 commit comments