I worte some code to test typescript how to translate ts -> js.
const printX = (name: string) => console.log(`hello, ${name}!`)
const tt = () => {
const t1 = 123;
const t2 = 456;
}
I checked the translated js file and it was,
var printX = function (name) { return console.log("hello, ".concat(name, "!")); };
var tt = function () {
var t1 = 123;
var t2 = 456;
};
Why Typescript translate from const keyword to var keyword.
I'm wondering if I can make ts translate force const to const.