@schizanon This is the first time I see the /* @type */ used in response.json() this way. Would it work if you just do a type cast like `const data = await response.json() as Status[]`?
@schizanon @type oooh I see, that makes sense
I tried a simple `await fetch` then `await response.json()` with an array typecast, but I couldn't repro the issue, so idk what happens there. One thing I noticed though is that my response.json() shows `Body.json()` and has type `Promise<any>` instead of what you have there though, so maybe that's related to why?
@schizanon When I looked up your error before, this node-fetch issue did come up https://github.com/node-fetch/node-fetch/issues/1262, so it might be related to their typedefs yea
v3.0.0 `await res.json()` is `unknown` · Issue #1262 · node-fetch/node-fetch

this is unusable in typescript. v3.0.0 types the return value of await res.json() as unknown which means "this is dangerous info, you have no idea what it is. don't touch it to avoid runtime errors...

GitHub
@cornflour @schizanon good thread. It essentially boils down to the fact you can't know what the response truly is without checking. Maybe it's a server error, maybe the network is down etc. unknown is annoying to work with, but any other type would be ignoring these possible edge cases. If you don't care, you can just cast it
@0xreed @schizanon I agree! There are even packages like ts-reset to change the default response type from `any` to `unknown` because it is better and more correct. Tbh in this case here, I am not even sure `unknown` is the issue since the error is talking about type `{}` instead, but I don't even know where that is coming from since I couldn't reproduce this error 🥲