* TS 1.0 spec: 4.12 * If FuncExpr is of type Any, or of an object type that has no call or construct signatures * but is a subtype of the Function interface, the call is an untyped function call.
(funcType, apparentFuncType, numCallSignatures, numConstructSignatures)
| 76536 | * but is a subtype of the Function interface, the call is an untyped function call. |
| 76537 | */ |
| 76538 | function isUntypedFunctionCall(funcType, apparentFuncType, numCallSignatures, numConstructSignatures) { |
| 76539 | // We exclude union types because we may have a union of function types that happen to have no common signatures. |
| 76540 | return isTypeAny(funcType) || isTypeAny(apparentFuncType) && !!(funcType.flags & 262144 /* TypeFlags.TypeParameter */) || |
| 76541 | !numCallSignatures && !numConstructSignatures && !(apparentFuncType.flags & 1048576 /* TypeFlags.Union */) && !(getReducedType(apparentFuncType).flags & 131072 /* TypeFlags.Never */) && isTypeAssignableTo(funcType, globalFunctionType); |
| 76542 | } |
| 76543 | function resolveNewExpression(node, candidatesOutArray, checkMode) { |
| 76544 | if (node.arguments && languageVersion < 1 /* ScriptTarget.ES5 */) { |
| 76545 | var spreadIndex = getSpreadArgumentIndex(node.arguments); |
no test coverage detected