swc/crates/swc_ecma_transforms_optimization/tests
magic-akari 9c9a538f23
refactor(es/typescript): Reimplement TypeScript pass (#7202)
**Description:**

## Bugfixes
- Exported `let`/`var` declarations in TypeScript namespaces should be mutable.
- Fix missing declaration of complex exported patterns in TypeScript namespaces.
- Preserve concrete TS namespaces.

## New Features
- Introducing [Verbatim Module Syntax](https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax).
- Enum value will now be inlined whenever possible within a single module, optimizing runtime performance.
- Constant enums will be automatically eliminated when feasible, This can reduce bundle size.
- Added support for cross-referencing enum values.

## Deprecated
`TsEnumConfig` is deprecated
  - The `treat_const_enum_as_enum` transform option is deprecated.
  - The `ts_enum_is_readonly` assumption option is deprecated.

**BREAKING CHANGE:**

TypeScript Config is changed.


**Related issue:**

 - Closes #5197
 - Closes #5259 
 - Closes #7177
 - Closes #7453
 - Closes #7676 
 - Closes #7681
 - Closes #7791 
 - Closes #7961
2023-09-25 01:41:00 +00:00
..
const-modules/issue-7747 fix(es/minifier): Handle ModuleDecl when transform const modules (#7959) 2023-09-16 09:17:26 +00:00
dce perf(es/minifier): Remove double-visit of DCE (#6069) 2022-10-06 16:08:03 +00:00
dce-jsx chore(repo): Configure prettier (#4523) 2022-05-04 14:25:28 +00:00
expr-simplifier chore(repo): Configure prettier (#4523) 2022-05-04 14:25:28 +00:00
const_modules.rs fix(es/minifier): Handle ModuleDecl when transform const modules (#7959) 2023-09-16 09:17:26 +00:00
fixture.rs build(cargo): Update rustc to nightly-2023-03-20 (#7170) 2023-03-30 08:06:02 +00:00
remove_imports_with_side_effects.rs feat(es/transforms): Add an option to drop unused imports (#6962) 2023-03-05 05:21:58 +00:00
simplify_dce.rs fix(es/helpers): Remove unnecessary parameters in helper_expr! macro (#7296) 2023-04-20 08:26:34 +00:00
simplify_inlining.rs refactor(es/typescript): Reimplement TypeScript pass (#7202) 2023-09-25 01:41:00 +00:00
simplify.rs fix(es/helpers): Use snake_case for helpers (#7147) 2023-03-31 15:15:21 +09:00