From 0b90e966c5e22b95c283a10407234cad37b8f19b Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Wed, 15 Jun 2022 15:25:25 +0100 Subject: chore(cli/cache): Remove CacheType::Declaration (#14873) --- cli/cache.rs | 3 --- cli/emit.rs | 5 ----- 2 files changed, 8 deletions(-) (limited to 'cli') diff --git a/cli/cache.rs b/cli/cache.rs index eb6ae26ca..8f8e1ade1 100644 --- a/cli/cache.rs +++ b/cli/cache.rs @@ -23,7 +23,6 @@ pub struct EmitMetadata { } pub enum CacheType { - Declaration, Emit, SourceMap, TypeScriptBuildInfo, @@ -181,7 +180,6 @@ impl Cacher for FetchCacher { specifier: &ModuleSpecifier, ) -> Option { let extension = match cache_type { - CacheType::Declaration => "d.ts", CacheType::Emit => "js", CacheType::SourceMap => "js.map", CacheType::TypeScriptBuildInfo => "buildinfo", @@ -206,7 +204,6 @@ impl Cacher for FetchCacher { value: String, ) -> Result<(), AnyError> { let extension = match cache_type { - CacheType::Declaration => "d.ts", CacheType::Emit => "js", CacheType::SourceMap => "js.map", CacheType::TypeScriptBuildInfo => "buildinfo", diff --git a/cli/emit.rs b/cli/emit.rs index a4fdedab7..7a7b22707 100644 --- a/cli/emit.rs +++ b/cli/emit.rs @@ -443,11 +443,6 @@ pub fn check_and_maybe_emit( MediaType::SourceMap => { cache.set(CacheType::SourceMap, &specifier, emit.data)?; } - // this only occurs with the runtime emit, but we are using the same - // code paths, so we handle it here. - MediaType::Dts | MediaType::Dcts | MediaType::Dmts => { - cache.set(CacheType::Declaration, &specifier, emit.data)?; - } _ => unreachable!( "unexpected media_type {} {}", emit.media_type, specifier -- cgit v1.2.3