Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Nov 30, 2023
1 parent aacb254 commit 6a73cd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion crates/swc_estree_compat/src/babelify/class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ impl Babelify for ClassMember {
ClassMember::PrivateMethod(m) => ClassBodyEl::PrivateMethod(m.babelify(ctx)),
ClassMember::ClassProp(p) => ClassBodyEl::Prop(p.babelify(ctx)),
ClassMember::PrivateProp(p) => ClassBodyEl::PrivateProp(p.babelify(ctx)),
ClassMember::TsIndexSignature(s) => ClassBodyEl::TSIndex(s.babelify(ctx))
ClassMember::TsIndexSignature(s) => ClassBodyEl::TSIndex(s.babelify(ctx)),
ClassMember::Empty(_) => panic!(
"illegal conversion: Cannot convert {:?} to ClassBodyEl",
&self
),
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_estree_compat/src/babelify/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl Babelify for Expr {
Expr::TsAs(a) => ExprOutput::Expr(Box::alloc().init(Expression::TSAs(a.babelify(ctx)))),
Expr::TsInstantiation(..) => unimplemented!("Babel doesn't support this right now."),
Expr::PrivateName(p) => ExprOutput::Private(p.babelify(ctx)),
Expr::ContentTagExpression(p) => p.babelify(ctx)),
Expr::ContentTagExpression(p) => p.babelify(ctx),

// TODO(dwoznicki): how does babel handle these?
Expr::JSXMember(_) => panic!(
Expand Down

0 comments on commit 6a73cd5

Please sign in to comment.