ReadableStream type error
Not sure what I'm doing wrong here, but I'm getting a type error when trying to pass a request body on unchanged in a
fetch
.
Worker code is as follows:
It doesn't like the req.body being passed into the body
of the RequestInit for whatever reason4 Replies
Error seems weird because I would've assumed
ReadableStream<Uint8Array>
would fit within ReadableStream<any>
?body must be of type BodyInit
which then itself is Uint8Array?
or it might be the other way round, i'm not familiar with typescript errors, but either way, i'm not sure how to constrain the body to that desired type
looks like it was something in my tsconfig, copying the latest one from the template works