hono icon indicating copy to clipboard operation
hono copied to clipboard

Interface 'ClientResponse<T, U, F>' incorrectly extends interface 'Response'.

Open osameyy opened this issue 6 months ago • 2 comments

What version of Hono are you using?

4.5.8

What runtime/platform is your app running on?

Cloudflare Worker

What steps can reproduce the bug?

hono: 4.5.8

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

`node_modules/.pnpm/[email protected]/node_modules/hono/dist/types/client/types.d.ts:46:18 - error TS2430: Interface 'ClientResponse<T, U, F>' incorrectly extends interface 'Response'. The types returned by 'clone().json()' are incompatible between these types. Type 'Promise' is not assignable to type 'Promise<T>'. Type 'unknown' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'unknown'.

46 export interface ClientResponse<T, U extends number = StatusCode, F extends ResponseFormat = ResponseFormat> extends globalThis.Response { ~~~~~~~~~~~~~~

Found 1 error in node_modules/.pnpm/[email protected]/node_modules/hono/dist/types/client/types.d.ts:46`

osameyy avatar Aug 22 '24 10:08 osameyy