2 ms·
To be fair JS was a bit ridiculous pre ES2017. These days, you have async/await (even at the top level) and it just works when you use `node file.mjs` For TS,
by nailer 3y ago
To be fair JS was a bit ridiculous pre ES2017. These days, you have async/await (even at the top level) and it just works when you use `node file.mjs`
For TS, install '@digitak/esrun' and run:
esrun file.ts
(no tsconfig, package.json, etc. required)
That basically turns JS into the async equivalent of python and is great for boring sysadmin tasks.