summaryrefslogtreecommitdiff
path: root/cli/tsc.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2021-05-10 18:16:39 +0200
committerGitHub <noreply@github.com>2021-05-10 18:16:39 +0200
commitce48b32979b007c35130321ed0f91d8ffdb6d593 (patch)
tree6cab6a1349fb9541eac0324efbfc563625d5e656 /cli/tsc.rs
parent7fc211e62752dddd4f70f8feef24dbcea795c1eb (diff)
refactor(cli): replace loading file for --config flag with generic structure (#10481)
Currently file passed to --config file is parsed using TsConfig structure that does multiple things when loading the file. Instead of relying on that structure I've introduced ConfigFile structure that can be updated to sniff out more fields from the config file in the future.
Diffstat (limited to 'cli/tsc.rs')
-rw-r--r--cli/tsc.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/tsc.rs b/cli/tsc.rs
index 7abae5ca1..a47cc1ab0 100644
--- a/cli/tsc.rs
+++ b/cli/tsc.rs
@@ -1,10 +1,10 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
+use crate::config_file::TsConfig;
use crate::diagnostics::Diagnostics;
use crate::media_type::MediaType;
use crate::module_graph::Graph;
use crate::module_graph::Stats;
-use crate::tsc_config::TsConfig;
use deno_core::error::anyhow;
use deno_core::error::bail;
@@ -538,11 +538,11 @@ pub fn exec(request: Request) -> Result<Response, AnyError> {
#[cfg(test)]
mod tests {
use super::*;
+ use crate::config_file::TsConfig;
use crate::diagnostics::Diagnostic;
use crate::diagnostics::DiagnosticCategory;
use crate::module_graph::tests::MockSpecifierHandler;
use crate::module_graph::GraphBuilder;
- use crate::tsc_config::TsConfig;
use std::env;
use std::path::PathBuf;
use std::sync::Mutex;