refactor(flags): rename CheckFlag to TypecheckMode (#14111)

This commit is contained in:
Bartek Iwańczuk 2022-03-29 03:48:29 +02:00 committed by GitHub
parent 5a6a1eeb39
commit 381d565acf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 56 additions and 41 deletions

View file

@ -339,7 +339,7 @@ pub fn is_emittable(
pub struct CheckOptions {
/// The check flag from the option which can effect the filtering of
/// diagnostics in the emit result.
pub check: flags::CheckFlag,
pub typecheck_mode: flags::TypecheckMode,
/// Set the debug flag on the TypeScript type checker.
pub debug: bool,
/// If true, any files emitted will be cached, even if there are diagnostics
@ -430,7 +430,7 @@ pub fn check_and_maybe_emit(
root_names,
})?;
let diagnostics = if options.check == flags::CheckFlag::Local {
let diagnostics = if options.typecheck_mode == flags::TypecheckMode::Local {
response.diagnostics.filter(|d| {
if let Some(file_name) = &d.file_name {
!file_name.starts_with("http")