

Lesson 10 · 11 min
Async, fetch, real code
How to type what comes from a server without fooling yourself.
11 minLesson 10 of 10Practice includedAsk AI on any point
This is the lesson people usually learn TS for. An async function returns Promise<T>. await unwraps the Promise — as in MDN: async. Data from the network is unknown until you've checked it: the server isn't obliged to follow your type.
Sign in to continue
The rest of this lesson opens after sign up
The first lesson of every course is open without an account. To read on, solve the practice and use Ask, create a free account or log in.