Example input code:
namespace A {
export var x = 0;
}
namespace A {
console.log(x);
x = 0;
}
TypeScript 6.0.2 (playground):
"use strict";
var A;
(function (A) {
A.x = 0;
})(A || (A = {}));
(function (A) {
console.log(A.x);
A.x = 0;
})(A || (A = {}));
esbuild 0.28.0 (playground):
var A;
((A2) => {
A2.x = 0;
})(A || (A = {}));
((A2) => {
console.log(A2.x);
x = 0;
})(A || (A = {}));
Related issue: #1410
Example input code:
TypeScript 6.0.2 (playground):
esbuild 0.28.0 (playground):
Related issue: #1410