Skip to main content

Type Alias: DataFetcher()

DataFetcher = (url, init?) => Promise<unknown>

Defined in: src/serialization/parametrized.ts:45

Fetches render-time data. The default implementation calls the global fetch and returns parsed JSON; tests inject a stub so they never touch the network. This is the dependency-injection seam for renderParametrized.

Parameters​

url​

string

init?​

RequestInit

Returns​

Promise<unknown>