Leave an @types twin with no runtime package to the declaration bar in transitive selection

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Malte Ubl
2026-10-18 06:23:56 -07:00
co-authored by Claude Opus 5.5
parent e2c7eac01d
commit b4e25cdba0
+3 -1
View File
@@ -214,7 +214,9 @@ function detectAutoPackages(
continue;
}
if (judged?.has(npm.packageName)) continue;
if (viaTransitive) {
// An @types twin with no runtime package installed has nothing to
// compile (Node cannot load it either).
if (viaTransitive && !npm.packageName.startsWith("@types/")) {
judged!.add(npm.packageName);
sites!.set(npm.packageName, loc);
transitive.add(npm.packageName);