Skip to content

Commit

Permalink
fix: const enums weren't transpiled correctly (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Oct 23, 2023
1 parent 2dce380 commit f561463
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 58 deletions.
92 changes: 46 additions & 46 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,23 @@ swc_common = "=0.33.0"
swc_config = { version = "=0.1.7", optional = true }
swc_config_macro = { version = "=0.1.2", optional = true }
swc_ecma_ast = { version = "=0.110.0", features = ["serde-impl"] }
swc_ecma_codegen = { version = "=0.146.2", optional = true }
swc_ecma_codegen = { version = "=0.146.3", optional = true }
swc_ecma_codegen_macros = { version = "=0.7.3", optional = true }
swc_ecma_dep_graph = { version = "=0.113.2", optional = true }
swc_ecma_dep_graph = { version = "=0.113.3", optional = true }
swc_ecma_loader = { version = "=0.45.0", optional = true }
swc_ecma_parser = "=0.141.2"
swc_ecma_transforms_base = { version = "=0.134.6", optional = true }
swc_ecma_transforms_classes = { version = "=0.123.6", optional = true }
swc_ecma_transforms_compat = { version = "=0.160.8", optional = true }
swc_ecma_parser = "=0.141.3"
swc_ecma_transforms_base = { version = "=0.134.8", optional = true }
swc_ecma_transforms_classes = { version = "=0.123.8", optional = true }
swc_ecma_transforms_compat = { version = "=0.160.10", optional = true }
swc_ecma_transforms_macros = { version = "=0.5.3", optional = true }
swc_ecma_transforms_optimization = { version = "=0.195.4", optional = true }
swc_ecma_transforms_proposal = { version = "=0.168.10", optional = true }
swc_ecma_transforms_react = { version = "=0.180.8", optional = true }
swc_ecma_transforms_typescript = { version = "=0.185.4", optional = true }
swc_ecma_utils = { version = "=0.124.5", optional = true }
swc_ecma_transforms_optimization = { version = "=0.195.8", optional = true }
swc_ecma_transforms_proposal = { version = "=0.168.12", optional = true }
swc_ecma_transforms_react = { version = "=0.180.11", optional = true }
swc_ecma_transforms_typescript = { version = "=0.185.8", optional = true }
swc_ecma_utils = { version = "=0.124.7", optional = true }
swc_ecma_visit = { version = "=0.96.0", optional = true }
swc_eq_ignore_macros = "=0.1.2"
swc_bundler = { version = "=0.222.6", optional = true }
swc_bundler = { version = "=0.222.13", optional = true }
swc_graph_analyzer = { version = "=0.22.0", optional = true }
swc_macros_common = { version = "=0.3.8", optional = true }
swc_trace_macro = { version = "=0.1.3", optional = true }
Expand Down
9 changes: 9 additions & 0 deletions src/transpiling/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,13 @@ enum D {
B,
}
const enum E {
A,
B,
}
console.log(E.A);
namespace N {
export enum D {
A = "value"
Expand Down Expand Up @@ -513,6 +520,8 @@ export class A {
D[D["A"] = 0] = "A";
D[D["B"] = 1] = "B";
})(D || (D = {}));
var E;
console.log(0);
var N;
(function(N) {
let D;
Expand Down

0 comments on commit f561463

Please sign in to comment.