diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2021-09-07 10:39:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-07 10:39:32 -0400 |
commit | 2c2e3ec1ca47803f791ea72ea6247d8eedf87ec8 (patch) | |
tree | 9ba3ddfde58f4a4feaf98fc230ec18861891c9be /cli/tsc.rs | |
parent | a5bcf7033e66a828dc88a313f4cca11f116c3f83 (diff) |
refactor(lsp): use deno_ast and cache swc ASTs (#11780)
Diffstat (limited to 'cli/tsc.rs')
-rw-r--r-- | cli/tsc.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/tsc.rs b/cli/tsc.rs index 144ff8021..bfaaae971 100644 --- a/cli/tsc.rs +++ b/cli/tsc.rs @@ -2,10 +2,10 @@ use crate::config_file::TsConfig; use crate::diagnostics::Diagnostics; -use crate::media_type::MediaType; use crate::module_graph::Graph; use crate::module_graph::Stats; +use deno_ast::MediaType; use deno_core::error::anyhow; use deno_core::error::bail; use deno_core::error::AnyError; @@ -380,7 +380,7 @@ fn op_load(state: &mut State, args: Value) -> Result<Value, AnyError> { } else { specifier }; - let maybe_source = graph.get_source(&specifier); + let maybe_source = graph.get_source(&specifier).map(|t| t.to_string()); media_type = if let Some(media_type) = graph.get_media_type(&specifier) { media_type } else { |