Response shape notify() actually depends on - deliberately not the global Response type.
A spec-compliant fetch implementation from outside lib.dom (undici's own fetch export is the
motivating case: its Response and lib.dom's Response are structurally near-identical at
runtime but not nominally assignable to each other in TS, e.g. headers.entries()'s iterator
type) still satisfies this without a consumer-side cast.
typeFetchLikeResponse={ Â Â Â Â headers:{get(name:string):string|null}; Â Â Â Â ok:boolean; Â Â Â Â status:number; Â Â Â Â statusText:string; Â Â Â Â text():Promise<string>; }
Response shape
notify()actually depends on - deliberately not the globalResponsetype. A spec-compliant fetch implementation from outside lib.dom (undici's ownfetchexport is the motivating case: itsResponseand lib.dom'sResponseare structurally near-identical at runtime but not nominally assignable to each other in TS, e.g.headers.entries()'s iterator type) still satisfies this without a consumer-side cast.