Skip to content

Commit 25d3413

Browse files
authored
Allow signature help argument count to be equal to argument index (microsoft#58203)
1 parent 0ca1973 commit 25d3413

File tree

4 files changed

+1038
-6
lines changed

4 files changed

+1038
-6
lines changed

src/services/signatureHelp.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,6 @@ function getArgumentOrParameterListInfo(node: Node, position: number, sourceFile
287287
const { list, argumentIndex } = info;
288288

289289
const argumentCount = getArgumentCount(checker, list);
290-
if (argumentIndex !== 0) {
291-
Debug.assertLessThan(argumentIndex, argumentCount);
292-
}
293290
const argumentsSpan = getApplicableSpanForArguments(list, sourceFile);
294291
return { list, argumentIndex, argumentCount, argumentsSpan };
295292
}
@@ -660,9 +657,6 @@ function createSignatureHelpItems(
660657
const callTargetDisplayParts = callTargetSymbol ? symbolToDisplayParts(typeChecker, callTargetSymbol, useFullPrefix ? sourceFile : undefined, /*meaning*/ undefined) : emptyArray;
661658
const items = map(candidates, candidateSignature => getSignatureHelpItem(candidateSignature, callTargetDisplayParts, isTypeParameterList, typeChecker, enclosingDeclaration, sourceFile));
662659

663-
if (argumentIndex !== 0) {
664-
Debug.assertLessThan(argumentIndex, argumentCount);
665-
}
666660
let selectedItemIndex = 0;
667661
let itemsSeen = 0;
668662
for (let i = 0; i < items.length; i++) {

0 commit comments

Comments
 (0)