🤖 Pick PR #59203 (Skip ID inference errors on nodes c...) into release-5.5 (#59210)

Co-authored-by: Wesley Wigham <wwigham@gmail.com>
This commit is contained in:
TypeScript Bot
2024-07-16 11:25:08 -07:00
committed by GitHub
parent 16862b12c3
commit 326cb1f094
6 changed files with 529 additions and 0 deletions

View File

@@ -303,6 +303,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);
}