Address comments on IndexSignature inlay hint PR (#56613)

This commit is contained in:
Pranav Senthilnathan 2023-12-07 09:57:23 -08:00 committed by GitHub
parent 20c0f40526
commit 5b7344ef52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -753,9 +753,8 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] {
break;
case SyntaxKind.IndexSignature:
Debug.assertNode(node, isIndexSignatureDeclaration);
Debug.assertEqual(node.parameters.length, 1);
parts.push({ text: "[" });
visitForDisplayParts(node.parameters[0]);
visitDisplayPartList(node.parameters, ", ");
parts.push({ text: "]" });
if (node.type) {
parts.push({ text: ": " });