I am currently diving into typescript and I have observed that the code output always defaults to using var. Is there a way to make it output const and let in the .js file instead, or does typescript always require es5 output for some reason?
Thanks.
Here is an example:
// main.ts
const x: number = 2;
let y: string = 'hello';
// main.js
var x = 2;
var y = 'hello';
If this kind of output is possible, how exactly can one achieve it?
// main.js
const x = 2;
let y = 'hello';