Skip to content

Commit

Permalink
fix: emit TypeQuery type arguments (#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
abextm committed Sep 22, 2022
1 parent 543a610 commit b811f08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/generation/generate.rs
Expand Up @@ -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
}

Expand Down
5 changes: 5 additions & 0 deletions 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>;

0 comments on commit b811f08

Please sign in to comment.