From d88c8699173020df2d9827a5ae62e168941902f4 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sat, 13 Jan 2024 16:06:18 -0500 Subject: fix(check): should not panic when all specified files excluded (#21929) Closes #21926 --- cli/tools/check.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cli/tools') 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, options: CheckOptions, ) -> Result { + 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) -- cgit v1.2.3