Remove TsIndexSignature from typescript::strip (#922)

This commit is contained in:
강동윤 2020-08-01 21:32:11 +09:00 committed by GitHub
parent 881c3a369f
commit db0a56514d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View File

@ -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"

View File

@ -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, ..

View File

@ -671,3 +671,11 @@ to!(
}
}"#
);
to!(
issue_921,
"export abstract class Kernel {
[key: string]: any
}",
"export abstract class Kernel {}"
);