refactor(transformer): explicit skip TS statements in TS namespace transform (#3479)

No substantive change. This should just be slightly more efficient as we've already handled most of the other variants earlier in the match.
This commit is contained in:
overlookmotel 2024-05-31 05:52:14 +00:00
parent 7f7b5ea9e8
commit 84feceb118

View file

@ -253,12 +253,10 @@ impl<'a> TypeScript<'a> {
}
}
}
stmt => {
if let Some(decl) = stmt.as_declaration() {
if decl.is_typescript_syntax() {
continue;
}
}
Statement::TSTypeAliasDeclaration(_)
| Statement::TSInterfaceDeclaration(_)
| Statement::TSImportEqualsDeclaration(_) => {}
_ => {
new_stmts.push(stmt);
}
}