feat(codegen): minify for (_ of []) -> for(_ of[]) (#8086)

This commit is contained in:
Boshen 2024-12-24 04:17:50 +00:00
parent 8b8cbcd2db
commit f873139a0f

View file

@ -417,6 +417,7 @@ impl Gen for ForOfStatement<'_> {
p.print_soft_space();
p.print_space_before_identifier();
p.print_str("of");
p.print_soft_space();
self.right.print_expr(p, Precedence::Comma, Context::empty());
p.print_ascii_byte(b')');
p.print_body(&self.body, false, ctx);