summaryrefslogtreecommitdiff
path: root/cli/graph_util.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-06-28 16:45:55 -0400
committerGitHub <noreply@github.com>2022-06-28 16:45:55 -0400
commit01adbb1efb116d72dc24843294f335bd63b24b0a (patch)
tree920346be399301867567b45356b6613ca03bc109 /cli/graph_util.rs
parent5b7bcefa111b1e4fc1e02bb7fb1c8f152e5fd6aa (diff)
refactor: add `RootConfig` (#14985)
Diffstat (limited to 'cli/graph_util.rs')
-rw-r--r--cli/graph_util.rs11
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);