fix(types): remove DOM type dependencies from ClientResponse and request method (#4768)
Remove `extends globalThis.Response` from ClientResponse interface and replace `RequestInfo | URL` with `Request | string | URL` in the Hono.request() method signature. These changes make hono's type declarations self-contained without requiring DOM lib types (lib.dom.d.ts), enabling projects that use `skipLibCheck: false` in non-DOM environments (Bun, Node without DOM lib) to compile without errors. Changes: - ClientResponse: Remove `extends globalThis.Response`, add `redirected`, `type`, and `bytes()` properties inline so the interface remains structurally compatible with Response - Hono.request(): Replace `RequestInfo | URL` with `Request | string | URL` (semantically identical since RequestInfo = Request | string in DOM lib) Closes #3750 Related: #1200, #3312
Y
YevheniiKotyrlo committed
eb9c112614230d6e29e06e444eb26fcc7592eb7d
Parent: b1df304
Committed by GitHub <noreply@github.com>
on 2/26/2026, 12:48:57 PM