Repository: dprint/dprint-plugin-typescript (rust)

Issue:
Semicolon removed after index signature on class declaration
**Describe the bug**

dprint-plugin-typescript version: 0.73.0

**Input Code**

```ts
declare class Foo {
    [key: string]: any;
}
```

**Expected Output**

```ts
declare class Foo {
    [key: string]: any;
}
```

**Actual Output**

```ts
declare class Foo {
    [key: string]: any
}
```


Pull request description:
fix: semi-colon for index signatures in class declarations
Closes #415

Patch:
diff --git a/src/generation/generate.rs b/src/generation/generate.rs
index cc15be9..a582475 100644
--- a/src/generation/generate.rs
+++ b/src/generation/generate.rs
@@ -3141,6 +3141,10 @@ fn gen_index_signature<'a>(node: &'a TsIndexSignature, context: &mut Context<'a>
   ));
   items.extend(gen_type_ann_with_colon_if_exists(&node.type_ann, context));
 
+  if node.parent().is::<Class>() && context.config.semi_colons.is_true() {
+    items.push_str(";");
+  }
+
   items
 }
 


Test patch:
diff --git a/tests/specs/issues/issue0415.txt b/tests/specs/issues/issue0415.txt
new file mode 100644
index 0000000..d0ab2c2
--- /dev/null
+++ b/tests/specs/issues/issue0415.txt
@@ -0,0 +1,9 @@
+== should keep semi-colon ==
+declare class Foo {
+    [key: string]: any;
+}
+
+[expect]
+declare class Foo {
+    [key: string]: any;
+}