workers-types
workers-types copied to clipboard
The `fetch()` request parameter's type is not correct
The fetch() request's type is set as Request | string as you can see here:
https://github.com/cloudflare/workers-types/blob/4d2664ba55a5c4cc6eaa3d4a144de3156ba6ebda/index.d.ts#L1936
But a URL object should also be accepted (as you can see from this issue #1588 and the PR I opened to resolve it)
And in general the MDN fetch docs say that the parameter could generally be any object with a "stringifier"