Skip to content

Commit 08e6b1b

Browse files
committed
Update current scope when visiting namespace elements
Fixes #13098
1 parent 32c477a commit 08e6b1b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/compiler/transformers/ts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2731,7 +2731,7 @@ namespace ts {
27312731
let blockLocation: TextRange;
27322732
const body = node.body;
27332733
if (body.kind === SyntaxKind.ModuleBlock) {
2734-
addRange(statements, visitNodes((<ModuleBlock>body).statements, namespaceElementVisitor, isStatement));
2734+
saveStateAndInvoke(body, body => addRange(statements, visitNodes((<ModuleBlock>body).statements, namespaceElementVisitor, isStatement)));
27352735
statementsLocation = (<ModuleBlock>body).statements;
27362736
blockLocation = body;
27372737
}

tests/baselines/reference/metadataOfClassFromModule.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ var MyModule;
3838
}());
3939
__decorate([
4040
inject,
41-
__metadata("design:type", Object)
41+
__metadata("design:type", Leg)
4242
], Person.prototype, "leftLeg", void 0);
4343
MyModule.Person = Person;
4444
})(MyModule || (MyModule = {}));

0 commit comments

Comments
 (0)