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/emit.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/emit.rs')
-rw-r--r-- | cli/emit.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cli/emit.rs b/cli/emit.rs index c6fbfd9a0..004171f42 100644 --- a/cli/emit.rs +++ b/cli/emit.rs @@ -250,9 +250,11 @@ fn get_root_names( .into_iter() .filter_map(|(_, r)| match r { Ok((s, mt)) => match &mt { - MediaType::TypeScript | MediaType::Tsx | MediaType::Jsx => { - Some((s, mt)) - } + MediaType::TypeScript + | MediaType::Tsx + | MediaType::Mts + | MediaType::Cts + | MediaType::Jsx => Some((s, mt)), _ => None, }, _ => None, @@ -279,7 +281,7 @@ fn get_version(source_bytes: &[u8], config_bytes: &[u8]) -> String { } /// Determine if a given media type is emittable or not. -fn is_emittable(media_type: &MediaType, include_js: bool) -> bool { +pub(crate) fn is_emittable(media_type: &MediaType, include_js: bool) -> bool { match &media_type { MediaType::TypeScript | MediaType::Mts |