fetch is great until you call response.json() in TypeScript and get any back, throwing away your types right at the API boundary. Thereβs a small, reusable way to get a properly typed response without casting at every call site.
π Continue reading on my blog: πͺπΌ Typed fetch Response in TypeScript
Top comments (0)