diff options
Diffstat (limited to 'cli/graph_util.rs')
-rw-r--r-- | cli/graph_util.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cli/graph_util.rs b/cli/graph_util.rs index 533c9a493..991115319 100644 --- a/cli/graph_util.rs +++ b/cli/graph_util.rs @@ -1,8 +1,9 @@ // Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. use crate::colors; -use crate::emit::TypeLib; +use crate::emit::TsTypeLib; use crate::errors::get_error_class_name; + use deno_core::error::custom_error; use deno_core::error::AnyError; use deno_core::ModuleSpecifier; @@ -43,7 +44,7 @@ pub enum ModuleEntry { ts_check: bool, /// A set of type libs that the module has passed a type check with this /// session. This would consist of window, worker or both. - checked_libs: HashSet<TypeLib>, + checked_libs: HashSet<TsTypeLib>, maybe_types: Option<Resolved>, }, Configuration { @@ -385,7 +386,7 @@ impl GraphData { pub fn set_type_checked( &mut self, roots: &[(ModuleSpecifier, ModuleKind)], - lib: &TypeLib, + lib: TsTypeLib, ) { let specifiers: Vec<ModuleSpecifier> = match self.walk(roots, true, true, true) { @@ -396,7 +397,7 @@ impl GraphData { if let ModuleEntry::Module { checked_libs, .. } = self.modules.get_mut(&specifier).unwrap() { - checked_libs.insert(lib.clone()); + checked_libs.insert(lib); } } } @@ -405,7 +406,7 @@ impl GraphData { pub fn is_type_checked( &self, roots: &[(ModuleSpecifier, ModuleKind)], - lib: &TypeLib, + lib: &TsTypeLib, ) -> bool { roots.iter().all(|(r, _)| { let found = self.follow_redirect(r); |