summaryrefslogtreecommitdiff
path: root/cli/ast.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2021-04-09 23:35:29 +0200
committerGitHub <noreply@github.com>2021-04-09 23:35:29 +0200
commit1c7217e3909c72135020ff415e61644e20e1f62c (patch)
treee7fc2943aec824a3755dc627c7e10fa4f821a1b5 /cli/ast.rs
parent0fd1fb9329512258064c3c04e3c2d990f3748834 (diff)
chore: upgrade dependencies (#10094)
This commit upgrades: - swc_ecmascript - swc_bundler - deno_doc - deno_lint - dprint-plugin-typescript
Diffstat (limited to 'cli/ast.rs')
-rw-r--r--cli/ast.rs29
1 files changed, 15 insertions, 14 deletions
diff --git a/cli/ast.rs b/cli/ast.rs
index bbd4df74d..83d0e16e9 100644
--- a/cli/ast.rs
+++ b/cli/ast.rs
@@ -254,20 +254,21 @@ impl From<tsc_config::TsConfig> for EmitOptions {
fn strip_config_from_emit_options(
options: &EmitOptions,
) -> typescript::strip::Config {
- let mut config = typescript::strip::Config::default();
- config.import_not_used_as_values = match options.imports_not_used_as_values {
- ImportsNotUsedAsValues::Remove => {
- typescript::strip::ImportNotUsedAsValues::Remove
- }
- ImportsNotUsedAsValues::Preserve => {
- typescript::strip::ImportNotUsedAsValues::Preserve
- }
- // `Error` only affects the type-checking stage. Fall back to `Remove` here.
- ImportsNotUsedAsValues::Error => {
- typescript::strip::ImportNotUsedAsValues::Remove
- }
- };
- config
+ typescript::strip::Config {
+ import_not_used_as_values: match options.imports_not_used_as_values {
+ ImportsNotUsedAsValues::Remove => {
+ typescript::strip::ImportsNotUsedAsValues::Remove
+ }
+ ImportsNotUsedAsValues::Preserve => {
+ typescript::strip::ImportsNotUsedAsValues::Preserve
+ }
+ // `Error` only affects the type-checking stage. Fall back to `Remove` here.
+ ImportsNotUsedAsValues::Error => {
+ typescript::strip::ImportsNotUsedAsValues::Remove
+ }
+ },
+ ..Default::default()
+ }
}
/// A logical structure to hold the value of a parsed module for further