Check apparent type instead of function type in isUntypedFunctionCall
This commit is contained in:
parent
bc628bfa29
commit
5465a5aa72
1 changed files with 1 additions and 1 deletions
|
@ -17109,7 +17109,7 @@ namespace ts {
|
||||||
function isUntypedFunctionCall(funcType: Type, apparentFuncType: Type, numCallSignatures: number, numConstructSignatures: number) {
|
function isUntypedFunctionCall(funcType: Type, apparentFuncType: Type, numCallSignatures: number, numConstructSignatures: number) {
|
||||||
// We exclude union types because we may have a union of function types that happen to have no common signatures.
|
// We exclude union types because we may have a union of function types that happen to have no common signatures.
|
||||||
return isTypeAny(funcType) || isTypeAny(apparentFuncType) && funcType.flags & TypeFlags.TypeParameter ||
|
return isTypeAny(funcType) || isTypeAny(apparentFuncType) && funcType.flags & TypeFlags.TypeParameter ||
|
||||||
!numCallSignatures && !numConstructSignatures && !(funcType.flags & (TypeFlags.Union | TypeFlags.Never)) && isTypeAssignableTo(funcType, globalFunctionType);
|
!numCallSignatures && !numConstructSignatures && !(apparentFuncType.flags & (TypeFlags.Union | TypeFlags.Never)) && isTypeAssignableTo(funcType, globalFunctionType);
|
||||||
}
|
}
|
||||||
|
|
||||||
function resolveNewExpression(node: NewExpression, candidatesOutArray: Signature[]): Signature {
|
function resolveNewExpression(node: NewExpression, candidatesOutArray: Signature[]): Signature {
|
||||||
|
|
Loading…
Reference in a new issue