Top-level await landed in TypeScript 3.8. This video tutorial shows how you use it with Node.js 13. typescript.tv/new-features/top-level-await-in-type…
My FREE programming apps:
apps.apple.com/app/id659282498
play.google.com/store/apps/details?id=com.weloveco…
My FREE TypeScript Course:
typescript.tv/
Speaker:
Benny Neugebauer (@bennycode)
Follow Us:
🌐 typescript.tv/
🐦 twitter.com/typescripttv
📺 youtube.com/typescripttv
TL;DW:
➜ Use Node.js v13.3+
➜ Set "module" to "esnext" and "target" to "es2017" in "tsconfig.json"
➜ Set "type" to "module" in "package.json"
➜ Add flag "--harmony-top-level-await" to your "node" exec command
Read more:
➜ github.com/tc39/proposal-top-level-await
➜ v8.dev/features/top-level-await
➜ 2ality.com/2019/12/top-level-await.html
➜ www.typescriptlang.org/docs/handbook/release-notes…
Hashtags:
#TypeScript #Programming #WebDev #TypeScriptTV
コメント