fix(types): remove DOM type dependencies from ClientResponse and request method (#4768)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
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
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+5 added−3 removed
- other:+5 added−3 removed