FetchLike
type FetchLike = (input, init?) => Promise<Response>;Defined in: core/src/transport.ts:23
What a fetchImpl option takes: anything called like fetch that answers with a Response.
Narrower than typeof fetch, which a runtime may widen (Bun’s adds preconnect), so a plain
wrapper or a test double fits without a cast. Global fetch still fits.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
RequestInfo | URL |
init? |
RequestInit |
Returns
Section titled “Returns”Promise<Response>