Skip to content
providerkit
GitHub

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.

Parameter Type
input RequestInfo | URL
init? RequestInit

Promise<Response>