summaryrefslogtreecommitdiff
path: root/cli/emit.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-04-11 01:12:51 +0200
committerGitHub <noreply@github.com>2022-04-11 01:12:51 +0200
commit8ae17026cbb30ab23fd79ac5cf5c207af5ad90a3 (patch)
treed627be6104c0903b36ac38c6b56c2603469bbfec /cli/emit.rs
parenta4eee007ef28f918db9165c52a19bc30bd65bad3 (diff)
feat: Add "deno check" subcommand for type checking (#14072)
This commit adds new "deno check" subcommand. Currently it is an alias for "deno cache" with the difference that remote modules don't emit TS diagnostics by default. Prints warning for "deno run" subcommand if "--check" flag is not present and there's no "--no-check" flag. Adds "DENO_FUTURE_CHECK" env variable that allows to opt into new behavior now.
Diffstat (limited to 'cli/emit.rs')
-rw-r--r--cli/emit.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/emit.rs b/cli/emit.rs
index 809260ac0..337895a10 100644
--- a/cli/emit.rs
+++ b/cli/emit.rs
@@ -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 typecheck_mode: flags::TypecheckMode,
+ pub type_check_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.typecheck_mode == flags::TypecheckMode::Local {
+ let diagnostics = if options.type_check_mode == flags::TypeCheckMode::Local {
response.diagnostics.filter(|d| {
if let Some(file_name) = &d.file_name {
!file_name.starts_with("http")