Documentation
    Preparing search index...

    Type Alias FetchLike<TSignal>

    FetchLike: (url: string, init?: FetchInit<TSignal>) => Promise<FetchResponse>

    The IO seam: a URL in, a FetchResponse in, a promise out.

    The platform fetch is assignable to this (its first parameter accepts a string, RequestInit.signal accepts TSignal = AbortSignal, and Response structurally satisfies FetchResponse), so { fetch } needs no adapter in a browser or in Node ≥ 20.

    TSignal defaults to never, which makes FetchInit.signal unconstructible: a manager with no AssetManagerOptions.abortController never passes an init, and a one-parameter (url) => … implementation — the shape every call site used before cancellation landed — is still assignable. The type parameter exists to tie the transport and the abort handle together; see the module comment's measurement of why it cannot be a concrete structural type.

    Type Parameters

    • TSignal = never

    Type Declaration