MCPcopy Index your code
hub / github.com/nodejs/node / isUntypedFunctionCall

Function isUntypedFunctionCall

test/fixtures/snapshot/typescript.js:76538–76542  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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);

Callers 4

resolveCallExpressionFunction · 0.85
resolveDecoratorFunction · 0.85

Calls 3

isTypeAnyFunction · 0.85
getReducedTypeFunction · 0.85
isTypeAssignableToFunction · 0.85

Tested by

no test coverage detected