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

Function getParameterNameAtPosition

test/fixtures/snapshot/typescript.js:77479–77492  ·  view source on GitHub ↗
(signature, pos, overrideRestType)

Source from the content-addressed store, hash-verified

77477 return d.name.escapedText;
77478 }
77479 function getParameterNameAtPosition(signature, pos, overrideRestType) {
77480 var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);
77481 if (pos < paramCount) {
77482 return signature.parameters[pos].escapedName;
77483 }
77484 var restParameter = signature.parameters[paramCount] || unknownSymbol;
77485 var restType = overrideRestType || getTypeOfSymbol(restParameter);
77486 if (isTupleType(restType)) {
77487 var associatedNames = restType.target.labeledElementDeclarations;
77488 var index = pos - paramCount;
77489 return associatedNames && getTupleElementLabel(associatedNames[index]) || restParameter.escapedName + "_" + index;
77490 }
77491 return restParameter.escapedName;
77492 }
77493 function getParameterIdentifierNameAtPosition(signature, pos) {
77494 var _a;
77495 if (((_a = signature.declaration) === null || _a === void 0 ? void 0 : _a.kind) === 317 /* SyntaxKind.JSDocFunctionType */) {

Calls 4

getTypeOfSymbolFunction · 0.85
isTupleTypeFunction · 0.85
getTupleElementLabelFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…