We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f06f809 commit 0426e48Copy full SHA for 0426e48
src/compiler/checker.ts
@@ -35645,10 +35645,12 @@ namespace ts {
35645
if (!resolvedDirective || !resolvedDirective.resolvedFileName) {
35646
return;
35647
}
35648
- const file = host.getSourceFile(resolvedDirective.resolvedFileName)!;
35649
- // Add the transitive closure of path references loaded by this file (as long as they are not)
35650
- // part of an existing type reference.
35651
- addReferencedFilesToTypeDirective(file, key);
+ const file = host.getSourceFile(resolvedDirective.resolvedFileName);
+ if (file) {
+ // Add the transitive closure of path references loaded by this file (as long as they are not)
+ // part of an existing type reference.
35652
+ addReferencedFilesToTypeDirective(file, key);
35653
+ }
35654
});
35655
35656
0 commit comments