diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 0ca3136e5f9..7d15aa64b8c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10619,7 +10619,7 @@ namespace ts { target.flags & TypeFlags.Union ? some((target).types, t => isTypeDerivedFrom(source, t)) : source.flags & TypeFlags.InstantiableNonPrimitive ? isTypeDerivedFrom(getBaseConstraintOfType(source) || emptyObjectType, target) : target === globalObjectType ? !!(source.flags & (TypeFlags.Object | TypeFlags.NonPrimitive)) : - target === globalFunctionType ? isFunctionObjectType(source as ObjectType) : + target === globalFunctionType ? !!(source.flags & TypeFlags.Object) && isFunctionObjectType(source as ObjectType) : hasBaseType(source, getTargetType(target)); }