refactor: helpers methods on TypeCheckMode (#19393)

This commit is contained in:
David Sherret 2023-06-07 10:09:10 -04:00 committed by GitHub
parent 28ce0ef583
commit da9db887e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 34 additions and 42 deletions

View file

@ -3,7 +3,6 @@
use crate::args::CliOptions;
use crate::args::DenoSubcommand;
use crate::args::TsTypeLib;
use crate::args::TypeCheckMode;
use crate::cache::ParsedSourceCache;
use crate::emit::Emitter;
use crate::graph_util::graph_lock_or_exit;
@ -169,7 +168,7 @@ impl ModuleLoadPreparer {
drop(_pb_clear_guard);
// type check if necessary
if self.options.type_check_mode() != TypeCheckMode::None
if self.options.type_check_mode().is_true()
&& !self.graph_container.is_type_checked(&roots, lib)
{
let graph = Arc::new(graph.segment(&roots));