Skip to content

Commit

Permalink
Fix more
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jul 11, 2024
1 parent a77bec9 commit d8d928f
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 10 deletions.
3 changes: 1 addition & 2 deletions crates/swc_bundler/src/bundler/chunk/merge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -917,8 +917,7 @@ where
| Decl::TsTypeAlias(_)
| Decl::TsEnum(_)
| Decl::TsModule(_)
| Decl::Using(..)
| Decl::Invalid(..) => continue,
| Decl::Using(..) => continue,
};

tracing::trace!(
Expand Down
6 changes: 1 addition & 5 deletions crates/swc_ecma_minifier/src/compress/optimize/unused.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,11 +549,7 @@ impl Optimizer<'_> {
// TODO: Optimize
}

Decl::TsInterface(_)
| Decl::TsTypeAlias(_)
| Decl::TsEnum(_)
| Decl::TsModule(_)
| Decl::Invalid(..) => {
Decl::TsInterface(_) | Decl::TsTypeAlias(_) | Decl::TsEnum(_) | Decl::TsModule(_) => {
// Nothing to do. We might change this to unreachable!()
}
}
Expand Down
1 change: 0 additions & 1 deletion crates/swc_ecma_transforms_typescript/src/strip_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ impl IsDeclare for Decl {
Decl::TsInterface(_) | Decl::TsTypeAlias(_) => true,
Decl::TsEnum(ts_enum) => ts_enum.declare,
Decl::TsModule(ts_module) => ts_module.declare || ts_module.global,
Decl::Invalid(..) => false,
}
}
}
1 change: 0 additions & 1 deletion crates/swc_estree_compat/src/babelify/decl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ impl Babelify for Decl {
Decl::TsTypeAlias(d) => Declaration::TSTypeAliasDecl(d.babelify(ctx)),
Decl::TsEnum(d) => Declaration::TSEnumDecl(d.babelify(ctx)),
Decl::TsModule(d) => Declaration::TSModuleDecl(d.babelify(ctx)),
Decl::Invalid(..) => unreachable!(),
}
}
}
Expand Down
1 change: 0 additions & 1 deletion crates/swc_estree_compat/src/babelify/stmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ impl Babelify for Stmt {
Decl::TsTypeAlias(d) => Statement::TSTypeAliasDecl(d.babelify(ctx)),
Decl::TsEnum(d) => Statement::TSEnumDecl(d.babelify(ctx)),
Decl::TsModule(d) => Statement::TSModuleDecl(d.babelify(ctx)),
Decl::Invalid(..) => unreachable!(),
},
Stmt::Expr(s) => Statement::Expr(s.babelify(ctx)),
}
Expand Down

0 comments on commit d8d928f

Please sign in to comment.