diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2023-06-06 17:07:46 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-06 17:07:46 -0400 |
| commit | 2aba4365ae620a8f097800e7cf85ff86f566b69a (patch) | |
| tree | 5e3e9b30742455c72f2edc3fa5db0b7cbabe46e8 /cli/tools/doc.rs | |
| parent | 455b0eb8bb8445f80d9c80a9161f18c1dede5733 (diff) | |
perf(cli): conditionally load typescript declaration files (#19392)
Closes #18583
Diffstat (limited to 'cli/tools/doc.rs')
| -rw-r--r-- | cli/tools/doc.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/tools/doc.rs b/cli/tools/doc.rs index 2cb53cb6a..87fa25315 100644 --- a/cli/tools/doc.rs +++ b/cli/tools/doc.rs @@ -16,6 +16,7 @@ use deno_core::error::AnyError; use deno_core::resolve_path; use deno_core::resolve_url_or_path; use deno_doc as doc; +use deno_graph::GraphKind; use deno_graph::ModuleSpecifier; use std::path::PathBuf; @@ -43,7 +44,7 @@ pub async fn print_docs( Vec::new(), ); let analyzer = deno_graph::CapturingModuleAnalyzer::default(); - let mut graph = deno_graph::ModuleGraph::default(); + let mut graph = deno_graph::ModuleGraph::new(GraphKind::TypesOnly); graph .build( vec![source_file_specifier.clone()], @@ -87,7 +88,7 @@ pub async fn print_docs( file_fetcher.insert_cached(root); let graph = module_graph_builder - .create_graph(vec![root_specifier.clone()]) + .create_graph(GraphKind::TypesOnly, vec![root_specifier.clone()]) .await?; if let Some(lockfile) = maybe_lockfile { |
