diff --git a/crates/oxc_traverse/scripts/lib/walk.mjs b/crates/oxc_traverse/scripts/lib/walk.mjs index 33bf1aed35a6c7..1e604b0b54c0ae 100644 --- a/crates/oxc_traverse/scripts/lib/walk.mjs +++ b/crates/oxc_traverse/scripts/lib/walk.mjs @@ -132,7 +132,11 @@ function generateWalkForStruct(type, types) { // TODO: Type names shouldn't be hard-coded here. They should be represented in attrs in AST. let isBlockScope = [ - 'Program', 'BlockStatement', 'Function', 'ArrowFunctionExpression', 'StaticBlock', + 'Program', + 'BlockStatement', + 'Function', + 'ArrowFunctionExpression', + 'StaticBlock', 'TSModuleDeclaration', ].includes(type.name); if (isBlockScope) {