From 1727912f0437a7f367d90040fc4b0b4f3efd017a Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 29 Nov 2022 10:13:26 -0800 Subject: [PATCH] Cherry-pick fix around `visitEachChild` to release-4.9. (#51544) --- 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 4069b1f86164a..18289157948b8 100644 --- a/src/compiler/visitorPublic.ts +++ b/src/compiler/visitorPublic.ts @@ -1304,9 +1304,9 @@ namespace ts { }, // 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