summaryrefslogtreecommitdiff
path: root/cli/tools/check.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/check.rs')
-rw-r--r--cli/tools/check.rs4
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)