visitEachChild not traversing all nodes (#51543)

fixes https://github.com/microsoft/TypeScript/issues/51542
This commit is contained in:
Simon Tretter 2022-11-16 00:18:17 +01:00 committed by GitHub
parent dfc1242aaf
commit f4ddc1a09b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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