From 0772963d49c6038d692a7be6ae2d1fe494a48dd2 Mon Sep 17 00:00:00 2001 From: Simon Tretter Date: Tue, 15 Nov 2022 23:31:49 +0100 Subject: [PATCH] visitEachChild not traversing all nodes fixes https://github.com/microsoft/TypeScript/issues/51542 --- src/compiler/visitorPublic.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/visitorPublic.ts b/src/compiler/visitorPublic.ts index 2f22a76e0e2d1..1dec828d395d7 100644 --- a/src/compiler/visitorPublic.ts +++ b/src/compiler/visitorPublic.ts @@ -1324,9 +1324,9 @@ const visitEachChildTable: VisitEachChildTable = { }, // Top-level nodes - [SyntaxKind.SourceFile]: function visitEachChildOfSourceFile(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + [SyntaxKind.SourceFile]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { return context.factory.updateSourceFile(node, - visitLexicalEnvironment(node.statements, visitor, context, /*start*/ undefined, /*ensureUseStrict*/ undefined, nodesVisitor)); + visitLexicalEnvironment(node.statements, visitor, context)); }, // Transformation nodes