1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use swc_ecma_ast::ImportDecl;
use swc_ecma_visit::{as_folder, noop_visit_mut_type, Fold, VisitMut};
pub fn import_assertions() -> impl VisitMut + Fold {
as_folder(ImportAssertions)
}
struct ImportAssertions;
impl VisitMut for ImportAssertions {
noop_visit_mut_type!();
fn visit_mut_import_decl(&mut self, n: &mut ImportDecl) {
n.asserts = None;
}
}