diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-07-08 19:26:39 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-08 11:26:39 +0200 |
commit | 82aabb657a8fbaf107e58214490fdd129db3ae6b (patch) | |
tree | 1b92a346f546c5e69c3abd879abdc7728adbc11c /cli/msg.rs | |
parent | 862bc2ecae3d9c3f880201d2302ca869d911eb69 (diff) |
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.
Diffstat (limited to 'cli/msg.rs')
-rw-r--r-- | cli/msg.rs | 18 |
1 files changed, 10 insertions, 8 deletions
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) } |