Re:Deno 1.6 supports compiling TypeScript to a single execut...
by twodai on Thursday December 10, 2020 @08:37AM
(#25373528)
Really like async await. The only case ive found for callbacks is for the top level function call in a script. Calling ".then()" is useful since top level await is still not a thing, and may never be.
[ Parent
| on HN ]
Re:Deno 1.6 supports compiling TypeScript to a single execut...
by richeyryan on Thursday December 10, 2020 @09:10AM
(#25373839)
Top level await is at stage 3: https://github.com/tc39/proposal-top-level-await
Its in Typescript 3.8, Node 14.8 and probably in your Babel setup. I probably wont get to use Node 14 in prod for a while but I get by with a `main` function that has everything in that gets called at the bottom.