From 82aabb657a8fbaf107e58214490fdd129db3ae6b Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Wed, 8 Jul 2020 19:26:39 +1000 Subject: feat: add --no-check option (#6456) This commit adds a "--no-check" option to following subcommands: - "deno cache" - "deno info" - "deno run" - "deno test" The "--no-check" options allows to skip type checking step and instead directly transpiles TS sources to JS sources. This solution uses `ts.transpileModule()` API and is just an interim solution before implementing it fully in Rust. --- cli/msg.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'cli/msg.rs') diff --git a/cli/msg.rs b/cli/msg.rs index 3e5000296..5c50c96ab 100644 --- a/cli/msg.rs +++ b/cli/msg.rs @@ -55,10 +55,11 @@ pub fn enum_name_media_type(mt: MediaType) -> &'static str { #[derive(Clone, Copy, PartialEq, Debug)] pub enum CompilerRequestType { Compile = 0, - Bundle = 1, - RuntimeCompile = 2, - RuntimeBundle = 3, - RuntimeTranspile = 4, + Transpile = 1, + Bundle = 2, + RuntimeCompile = 3, + RuntimeBundle = 4, + RuntimeTranspile = 5, } impl Serialize for CompilerRequestType { @@ -68,10 +69,11 @@ impl Serialize for CompilerRequestType { { let value: i32 = match self { CompilerRequestType::Compile => 0 as i32, - CompilerRequestType::Bundle => 1 as i32, - CompilerRequestType::RuntimeCompile => 2 as i32, - CompilerRequestType::RuntimeBundle => 3 as i32, - CompilerRequestType::RuntimeTranspile => 4 as i32, + CompilerRequestType::Transpile => 1 as i32, + CompilerRequestType::Bundle => 2 as i32, + CompilerRequestType::RuntimeCompile => 3 as i32, + CompilerRequestType::RuntimeBundle => 4 as i32, + CompilerRequestType::RuntimeTranspile => 5 as i32, }; Serialize::serialize(&value, serializer) } -- cgit v1.2.3