diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-03-21 11:46:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-21 15:46:40 +0000 |
commit | 2fcf1f14cf29bb68995f652f93a4f6e3cb55c8d7 (patch) | |
tree | 04fb972934969cb01a52f3b9b8af0a17134ef5b6 /cli/errors.rs | |
parent | 0366d6833f25b786e897ce0d6393f692507f0532 (diff) |
feat: TypeScript 5.0.2 (except decorators) (#18294)
This upgrades TypeScript to 5.0.2, but does not have ES decorator
support because swc does not support that yet.
Diffstat (limited to 'cli/errors.rs')
-rw-r--r-- | cli/errors.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/cli/errors.rs b/cli/errors.rs index 3ec17e8b2..2ffad73b3 100644 --- a/cli/errors.rs +++ b/cli/errors.rs @@ -11,6 +11,7 @@ use deno_ast::Diagnostic; use deno_core::error::AnyError; +use deno_graph::ModuleError; use deno_graph::ModuleGraphError; use deno_graph::ResolutionError; use import_map::ImportMapError; @@ -25,18 +26,17 @@ fn get_diagnostic_class(_: &Diagnostic) -> &'static str { fn get_module_graph_error_class(err: &ModuleGraphError) -> &'static str { match err { - ModuleGraphError::LoadingErr(_, _, err) => { - get_error_class_name(err.as_ref()) - } - ModuleGraphError::InvalidTypeAssertion { .. } => "SyntaxError", - ModuleGraphError::ParseErr(_, diagnostic) => { - get_diagnostic_class(diagnostic) - } + ModuleGraphError::ModuleError(err) => match err { + ModuleError::LoadingErr(_, _, err) => get_error_class_name(err.as_ref()), + ModuleError::InvalidTypeAssertion { .. } => "SyntaxError", + ModuleError::ParseErr(_, diagnostic) => get_diagnostic_class(diagnostic), + ModuleError::UnsupportedMediaType { .. } + | ModuleError::UnsupportedImportAssertionType { .. } => "TypeError", + ModuleError::Missing(_, _) | ModuleError::MissingDynamic(_, _) => { + "NotFound" + } + }, ModuleGraphError::ResolutionError(err) => get_resolution_error_class(err), - ModuleGraphError::UnsupportedMediaType { .. } - | ModuleGraphError::UnsupportedImportAssertionType { .. } => "TypeError", - ModuleGraphError::Missing(_, _) - | ModuleGraphError::MissingDynamic(_, _) => "NotFound", } } |