# TypeScript Level 10: Async & External Data

> Level 10: Async & External Data of the LoWisa TypeScript course: Typed Promises and Async Code, API Response Types, Runtime Validation vs Compile-Time Types. 3 lessons and 9 ideas, each explained in one line.

Async & External Data is level 10 of 16 of the [LoWisa TypeScript course](/courses/typescript/). It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

## Typed Promises and Async Code

- **Promise<T>.** A **Promise<T>** names what eventually arrives: await unwraps it back to T with the checker watching.
- **Async return types.** An **async** function always returns a promise: annotate the payload: async load(): Promise<User[]>.
- **Typed errors.** A caught error is **unknown** under strict options: prove what it is before reading its message.

## API Response Types

- **Modelling responses.** Write a type for each API **response** shape: the compiler then tracks that shape through your whole app.
- **Nullable fields.** Model what the server truly sends: fields that can be **null** must say so, or the crash arrives in production.
- **Versioned shapes.** When the API changes, change the **type** first: every place that must adapt lights up as an error.

## Runtime Validation vs Compile-Time Types

- **The trust boundary.** A cast on a fetch result is a **promise** you did not verify: external data must be checked at runtime.
- **Schema validation.** A **schema** validator checks the real payload and hands back a typed value: parse, don’t assert.
- **Single source of truth.** Derive the static type FROM the schema, so runtime check and compile-time type can never **drift** apart.

## Before and after this level

- **Before:** [Level 9: Compiler & Configuration](/courses/typescript/level-9-compiler-and-configuration/): tsconfig, Strictness and Compiler Options, Build Targets and Module Formats.
- **Next:** [Level 11: Libraries & Declarations](/courses/typescript/level-11-libraries-and-declarations/): Declaration Files, Third-Party Type Definitions, Publishing Typed Libraries.

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See [Checkpoints and flashcards](/help/checkpoints-and-flashcards/).

## Frequently asked questions

### What does TypeScript Level 10: Async & External Data cover?

Typed Promises and Async Code, API Response Types, Runtime Validation vs Compile-Time Types: 3 lessons and 9 ideas.

### What should I know before this level?

The level before it, Level 9: Compiler & Configuration, which covers tsconfig, Strictness and Compiler Options, Build Targets and Module Formats.

## Learn TypeScript on your phone

The first level is free. LoWisa is on Google Play and the App Store.

---

Source: https://lowisa.dev/courses/typescript/level-10-async-and-external-data/ · Updated 2026-11-16
