I'm diving into the world of TypeScript and I am facing an issue with configuring it to compile the latest version of JavaScript. Despite my efforts, it doesn't seem to work.
Here is my tsconfig.json file:
{
"compilerOptions": {
"target": "esnext"
}
}
This is the structure of my directory:
https://i.sstatic.net/8aKrE.png
I am unsure why this problem is occurring, any help or guidance would be greatly appreciated.
The content of script.ts file:
async function hello() {
return "World";
}
The resulting JavaScript file looks like this:
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
// JavaScript function code here
};
function hello() {
return __awaiter(this, void 0, void 0, function () {
// More JavaScript code here
});
}