Example input code:
namespace A {
export var x = 0;
}
import x = A.x;
console.log(x);
TypeScript 6.0.2 with "target": "ES2020" (playground):
"use strict";
var A;
(function (A) {
A.x = 0;
})(A || (A = {}));
var x = A.x;
console.log(x);
esbuild 0.28.0 with --target=es2020 (playground):
var A;
((A2) => {
A2.x = 0;
})(A || (A = {}));
const x = A.x;
console.log(x);
Example input code:
TypeScript 6.0.2 with
"target": "ES2020"(playground):esbuild 0.28.0 with
--target=es2020(playground):