diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2024-01-13 16:06:18 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-13 16:06:18 -0500 |
| commit | d88c8699173020df2d9827a5ae62e168941902f4 (patch) | |
| tree | 03437e3497e29a98c915f6489974c6f7d06e56de /cli/tools | |
| parent | daed58855775b4da042272a296b500d9b9e76e7d (diff) | |
fix(check): should not panic when all specified files excluded (#21929)
Closes #21926
Diffstat (limited to 'cli/tools')
| -rw-r--r-- | cli/tools/check.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/tools/check.rs b/cli/tools/check.rs index 7133f4d3f..7ce9c578c 100644 --- a/cli/tools/check.rs +++ b/cli/tools/check.rs @@ -87,6 +87,10 @@ impl TypeChecker { graph: Arc<ModuleGraph>, options: CheckOptions, ) -> Result<Diagnostics, AnyError> { + if graph.roots.is_empty() { + return Ok(Default::default()); + } + // node built-in specifiers use the @types/node package to determine // types, so inject that now (the caller should do this after the lockfile // has been written) |
