diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2021-12-10 09:12:21 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-10 09:12:21 +1100 |
commit | 345f0fbe5cdaa71af067c7072537f1823fe4ada5 (patch) | |
tree | c37062607fe23ef9d1826c1d43a10a712b827f3c /cli/proc_state.rs | |
parent | a3d024ac2ec8d73f7bf268823866d2342d1c1eb1 (diff) |
feat(cli): update to TypeScript 4.5 (#12410)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/proc_state.rs')
-rw-r--r-- | cli/proc_state.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cli/proc_state.rs b/cli/proc_state.rs index 220138e6f..53321c2cc 100644 --- a/cli/proc_state.rs +++ b/cli/proc_state.rs @@ -586,14 +586,17 @@ impl ProcState { | MediaType::Mjs ) { module.source.as_str().to_string() - // The emit may also be missing when a `.dts` file is in the + // The emit may also be missing when a declaration file is in the // graph. There shouldn't be any runtime statements in the source // file and if there was, users would be shown a `TS1036` // diagnostic. So just return an empty emit. - } else if media_type == &MediaType::Dts { + } else if !emit::is_emittable(media_type, true) { "".to_string() } else { - unreachable!("unexpected missing emit: {}", specifier) + unreachable!( + "unexpected missing emit: {} media type: {}", + specifier, media_type + ) }; let dependencies = module.dependencies.clone(); let module_entry = ModuleEntry::Module { code, dependencies }; |