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

Function getParameterCount

test/fixtures/snapshot/typescript.js:77594–77603  ·  view source on GitHub ↗
(signature)

Source from the content-addressed store, hash-verified

77592 // the parameter count of (x: number, ...args: [number, ...string[], boolean])) is also 3. In the
77593 // latter example, the effective rest type is [...string[], boolean].
77594 function getParameterCount(signature) {
77595 var length = signature.parameters.length;
77596 if (signatureHasRestParameter(signature)) {
77597 var restType = getTypeOfSymbol(signature.parameters[length - 1]);
77598 if (isTupleType(restType)) {
77599 return length + restType.target.fixedLength - (restType.target.hasRestElement ? 0 : 1);
77600 }
77601 }
77602 return length;
77603 }
77604 function getMinArgumentCount(signature, flags) {
77605 var strongArityForUntypedJS = flags & 1 /* MinArgumentCountFlags.StrongArityForUntypedJS */;
77606 var voidIsNonOptional = flags & 2 /* MinArgumentCountFlags.VoidIsNonOptional */;

Callers 15

combineUnionParametersFunction · 0.85
compareSignaturesRelatedFunction · 0.85
isMatchingSignatureFunction · 0.85
applyToParameterTypesFunction · 0.85
isAritySmallerFunction · 0.85
hasCorrectArityFunction · 0.85
inferTypeArgumentsFunction · 0.85
getArgumentArityErrorFunction · 0.85

Calls 3

getTypeOfSymbolFunction · 0.85
isTupleTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…