Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion crates/oxc_transformer/src/common/statement_injector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ impl<'a> StatementInjectorStore<'a> {
}

/// Add multiple statements to be inserted immediately after the target statement.
pub fn insert_many_after(&self, target: Address, stmts: Vec<Statement<'a>>) {
pub fn insert_many_after<S>(&self, target: Address, stmts: S)
where
S: IntoIterator<Item = Statement<'a>>,
{
let mut insertions = self.insertions.borrow_mut();
let adjacent_stmts = insertions.entry(target).or_default();
adjacent_stmts.extend(
Expand Down
3 changes: 1 addition & 2 deletions crates/oxc_transformer/src/typescript/annotations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,7 @@ impl<'a, 'ctx> Traverse<'a> for TypeScriptAnnotations<'a, 'ctx> {
stmt.address(),
self.assignments
.iter()
.map(|assignment| assignment.create_this_property_assignment(ctx))
.collect::<Vec<_>>(),
.map(|assignment| assignment.create_this_property_assignment(ctx)),
);
self.has_super_call = true;
}
Expand Down