Skip to content

Commit

Permalink
Remove TsIndexSignature from typescript::strip (#922)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Aug 1, 2020
1 parent 881c3a3 commit db0a565
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ecmascript/transforms/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "swc_ecma_transforms"
version = "0.17.1"
version = "0.17.2"
authors = ["강동윤 <kdy1997.dev@gmail.com>"]
license = "Apache-2.0/MIT"
repository = "https://github.com/swc-project/swc.git"
Expand Down
1 change: 1 addition & 0 deletions ecmascript/transforms/src/typescript.rs
Expand Up @@ -781,6 +781,7 @@ impl Fold for Strip {
let members = members.fold_children_with(self);

members.move_flat_map(|member| match member {
ClassMember::TsIndexSignature(..) => None,
ClassMember::Constructor(Constructor { body: None, .. }) => None,
ClassMember::Method(ClassMethod {
is_abstract: true, ..
Expand Down
8 changes: 8 additions & 0 deletions ecmascript/transforms/tests/typescript_strip.rs
Expand Up @@ -671,3 +671,11 @@ to!(
}
}"#
);

to!(
issue_921,
"export abstract class Kernel {
[key: string]: any
}",
"export abstract class Kernel {}"
);

0 comments on commit db0a565

Please sign in to comment.