Skip to content

Glossary: TypeScript Beyond the Basics

Top-level await

Using `await` directly in a module, outside any `async` function. It lets a script wait for a promise, such as a `fetch` call, without wrapping the code in a function.

Where the book teaches it

Related terms

fetch