---
title: "Discussion on \"TypeScript’s New Top-Level Await\" | Hashnode"
description: "Discussion on \"TypeScript’s New Top-Level Await\". If you want to use async/await inside JavaScript in general, you have to define an async function before you can use the await.\nIn this article, I want to show you that it is possible to finally use top-level await instead of wrapping it between an a..."
url: "https://hashnode.com/posts/typescripts-new-top-level-await-cc6beadbde8/611ff096a5d08237f40df4a8"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [TypeScript’s New Top-Level Await](https://hasnode.byrayray.dev/typescripts-new-top-level-await-cc6beadbde8?utm_source=hashnode&utm_medium=feed)

If you want to use async/await inside JavaScript in general, you have to define an async function before you can use the await. In this article, I want to show you that it is possible to finally use top-level await instead of wrapping it between an a...

Jun 22, 2020 · 3 min read · hasnode.byrayray.dev  
Updated Aug 17, 2022  
Read the article

## Written by

[Dev By RayRay](https://hashnode.com/@devbyrayray)

@devbyrayray · Netherlands

  
[View profile](https://hashnode.com/@devbyrayray)

Tech Lead / Lead Developer in the 🇳🇱 https://byrayray.dev/

🚀 Tech Lead / Lead Developer 🔥 Writing about CSS, JavaScript, Typescript, Angular, Vue.js, Nuxt.js, Serverless functions, and a lot more web-related topics. https://byrayray.dev/

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
