Skip ID inference errors on nodes collected from other files (#59203)

This commit is contained in:
Wesley Wigham authored and GitHub committed 2024-07-09 16:03:17 -07:00
1 parent 9afdd74b40
commit de77dd4726
6 files changed
+529

No files matched your search

@@ -308,6 +308,7 @@ export function transformDeclarations(context: TransformationContext) {
}
function reportInferenceFallback(node: Node) {
if (!isolatedDeclarations || isSourceFileJS(currentSourceFile)) return;
if (getSourceFileOfNode(node) !== currentSourceFile) return; // Nested error on a declaration in another file - ignore, will be reemitted if file is in the output file set
if (isVariableDeclaration(node) && resolver.isExpandoFunctionDeclaration(node)) {
reportExpandoFunctionErrors(node);
}