refactor(transformer): shorter code in TS namespace transform (#3478)

Small refactor to shorten code.
This commit is contained in:
overlookmotel 2024-05-31 05:39:50 +00:00
parent 7e7b4526ba
commit 7f7b5ea9e8

View file

@ -83,12 +83,8 @@ impl<'a> TypeScript<'a> {
SPAN,
declaration,
);
let export_named_decl =
ModuleDeclaration::ExportNamedDeclaration(
export_named_decl,
);
let stmt =
self.ctx.ast.module_declaration(export_named_decl);
Statement::ExportNamedDeclaration(export_named_decl);
new_stmts.push(stmt);
}
new_stmts.push(transformed_stmt);