diff options
Diffstat (limited to 'cli/args/config_file.rs')
-rw-r--r-- | cli/args/config_file.rs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/cli/args/config_file.rs b/cli/args/config_file.rs index 3ba88c680..b5ee8c50a 100644 --- a/cli/args/config_file.rs +++ b/cli/args/config_file.rs @@ -185,10 +185,16 @@ fn parse_compiler_options( for (key, value) in compiler_options.iter() { let key = key.as_str(); - if IGNORED_COMPILER_OPTIONS.contains(&key) { - items.push(key.to_string()); - } else { - filtered.insert(key.to_string(), value.to_owned()); + // We don't pass "types" entries to typescript via the compiler + // options and instead provide those to tsc as "roots". This is + // because our "types" behavior is at odds with how TypeScript's + // "types" works. + if key != "types" { + if IGNORED_COMPILER_OPTIONS.contains(&key) { + items.push(key.to_string()); + } else { + filtered.insert(key.to_string(), value.to_owned()); + } } } let value = serde_json::to_value(filtered)?; |