Skip to content

Commit 5465a5a

Browse files
committed
Check apparent type instead of function type in isUntypedFunctionCall
1 parent bc628bf commit 5465a5a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17109,7 +17109,7 @@ namespace ts {
1710917109
function isUntypedFunctionCall(funcType: Type, apparentFuncType: Type, numCallSignatures: number, numConstructSignatures: number) {
1711017110
// We exclude union types because we may have a union of function types that happen to have no common signatures.
1711117111
return isTypeAny(funcType) || isTypeAny(apparentFuncType) && funcType.flags & TypeFlags.TypeParameter ||
17112-
!numCallSignatures && !numConstructSignatures && !(funcType.flags & (TypeFlags.Union | TypeFlags.Never)) && isTypeAssignableTo(funcType, globalFunctionType);
17112+
!numCallSignatures && !numConstructSignatures && !(apparentFuncType.flags & (TypeFlags.Union | TypeFlags.Never)) && isTypeAssignableTo(funcType, globalFunctionType);
1711317113
}
1711417114

1711517115
function resolveNewExpression(node: NewExpression, candidatesOutArray: Signature[]): Signature {

0 commit comments

Comments
 (0)