diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2024-04-08 19:45:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-08 19:45:20 +0100 |
commit | 3c346c8ea6aa888475c19d512ddd4c247c00b1ea (patch) | |
tree | d7e4e7e3369c79ad569cca3c982ead766f2d0189 /cli/lsp/tsc.rs | |
parent | 9752a153ea69328acb6a5ca179c4b8cf7780c894 (diff) |
perf(lsp): don't pass remote modules as tsc roots (#23259)
Diffstat (limited to 'cli/lsp/tsc.rs')
-rw-r--r-- | cli/lsp/tsc.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index 9c27f3f21..923a0d443 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -4064,7 +4064,9 @@ fn op_script_names(state: &mut OpState) -> Vec<String> { if seen.insert(specifier.as_str()) { if let Some(specifier) = documents.resolve_specifier(specifier) { // only include dependencies we know to exist otherwise typescript will error - if documents.exists(&specifier) { + if documents.exists(&specifier) + && (specifier.scheme() == "file" || documents.is_open(&specifier)) + { result.push(specifier.to_string()); } } |