MCPcopy Create free account
hub / github.com/nodejs/node / getPossibleGenericSignatures

Function getPossibleGenericSignatures

test/fixtures/snapshot/typescript.js:127789–127796  ·  view source on GitHub ↗
(called, typeArgumentCount, checker)

Source from the content-addressed store, hash-verified

127787 }
127788 ts.isPossiblyTypeArgumentPosition = isPossiblyTypeArgumentPosition;
127789 function getPossibleGenericSignatures(called, typeArgumentCount, checker) {
127790 var type = checker.getTypeAtLocation(called);
127791 if (ts.isOptionalChain(called.parent)) {
127792 type = removeOptionality(type, ts.isOptionalChainRoot(called.parent), /*isOptionalChain*/ true);
127793 }
127794 var signatures = ts.isNewExpression(called.parent) ? type.getConstructSignatures() : type.getCallSignatures();
127795 return signatures.filter(function (candidate) { return !!candidate.typeParameters && candidate.typeParameters.length >= typeArgumentCount; });
127796 }
127797 ts.getPossibleGenericSignatures = getPossibleGenericSignatures;
127798 // Get info for an expression like `f <` that may be the start of type arguments.
127799 function getPossibleTypeArgumentsInfo(tokenIn, sourceFile) {

Callers 1

Calls 2

removeOptionalityFunction · 0.85
filterMethod · 0.65

Tested by

no test coverage detected