diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-05-12 19:07:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 19:07:40 -0400 |
commit | 68c0fcb157bb47bbf58bcdcecf59d237fb84f201 (patch) | |
tree | 3c57e1c153412f18e8741e6b0af0a637389f9ea8 /cli/lsp/diagnostics.rs | |
parent | 7476ee34fadcefee630edbc564186155acebdf94 (diff) |
refactor(lsp): make `RequestMethod` private (#19114)
Diffstat (limited to 'cli/lsp/diagnostics.rs')
-rw-r--r-- | cli/lsp/diagnostics.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs index 7d13cfdb5..0f96a498b 100644 --- a/cli/lsp/diagnostics.rs +++ b/cli/lsp/diagnostics.rs @@ -50,7 +50,6 @@ pub type DiagnosticRecord = pub type DiagnosticVec = Vec<DiagnosticRecord>; type DiagnosticMap = HashMap<ModuleSpecifier, (Option<i32>, Vec<lsp::Diagnostic>)>; -type TsDiagnosticsMap = HashMap<String, Vec<crate::tsc::Diagnostic>>; type DiagnosticsByVersionMap = HashMap<Option<i32>, Vec<lsp::Diagnostic>>; #[derive(Clone)] @@ -539,10 +538,9 @@ async fn generate_ts_diagnostics( let (enabled_specifiers, disabled_specifiers) = specifiers .into_iter() .partition::<Vec<_>, _>(|s| config.specifier_enabled(s)); - let ts_diagnostics_map: TsDiagnosticsMap = if !enabled_specifiers.is_empty() { - let req = tsc::RequestMethod::GetDiagnostics(enabled_specifiers); + let ts_diagnostics_map = if !enabled_specifiers.is_empty() { ts_server - .request_with_cancellation(snapshot.clone(), req, token) + .get_diagnostics(snapshot.clone(), enabled_specifiers, token) .await? } else { Default::default() |