Closed Tobbe closed 2 years ago
You need to set "target": "esnext"
Awesome! That works. Thank you π
Why doesn't tsc also need it to be "esnext"
?
I don't know π It's actually EsBuild that enforces the use of esnext
over es2021
. Maybe it should work with es2021 like tsc does, in that case it's a EsBuild bug.
Alright π Thanks for getting back to me!
I can't get top-level await to work with esrun.
This is my tsconfig file
It works fine if I do just
npx tsc
. But If I donpx @digitak/esrun myfile.ts
I getmyfile.ts:23:19: error: Top-level await is not available in the configured target environment ("es2021")
.How can I use top-level await with esrun?