Skip to content

Glossary: TypeScript Beyond the Basics

Response

Also written: res, res.ok, res.json()

What `fetch` returns: `status` is the code, `ok` is true for 200 to 299, and `json()` reads and parses the body. `res.json()` returns `any`, so treat it as `unknown`.

Where the book teaches it

Related terms

fetchHTTP status codes