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

Issue:
dprint removes type arguments in `typeof` expressions
dprint removes type arguments to the target of `typeof` expressions, changing the meaning of the code.

dprint 0.31.1
dprint-plugin-typescript version: 0.73.1

**Input Code**

```ts
function getCtor(): typeof MyClass<Foo>;
```

**Expected Output**

```ts
function getCtor(): typeof MyClass<Foo>;
```

**Actual Output**

```ts
function getCtor(): typeof MyClass;
```


Pull request:
fix: emit TypeQuery type arguments
Fixes #426

Turns out this was more trivial than I expected it would be

Patch:
diff --git a/src/generation/generate.rs b/src/generation/generate.rs
index aab0713..9cc1eba 100644
--- a/src/generation/generate.rs
+++ b/src/generation/generate.rs
@@ -5852,6 +5852,9 @@ fn gen_type_query<'a>(node: &'a TsTypeQuery, context: &mut Context<'a>) -> Print
   items.push_str("typeof");
   items.push_signal(Signal::SpaceIfNotTrailing);
   items.extend(gen_node(node.expr_name.into(), context));
+  if let Some(type_args) = node.type_args {
+    items.extend(gen_node(type_args.into(), context));
+  }
   items
 }
 


Test patch:
diff --git a/tests/specs/issues/issue0426.txt b/tests/specs/issues/issue0426.txt
new file mode 100644
index 0000000..73a692d
--- /dev/null
+++ b/tests/specs/issues/issue0426.txt
@@ -0,0 +1,5 @@
+== should emit type arguments in typeof expressions ==
+function getCtor(): typeof MyClass<Foo>;
+
+[expect]
+function getCtor(): typeof MyClass<Foo>;