Skip to content

hono 4.9.8 typing regression #4426

@c4rloscg

Description

@c4rloscg

What version of Hono are you using?

4.9.8

What runtime/platform is your app running on? (with version if possible)

Bun 1.2.20

What steps can reproduce the bug?

After upgrading to hono 4.9.8, TypeScript inference for the client created with hc<ApiRoutes> no longer preserves per-route response generics. In my codebase this causes generated client calls like rootClient.routeA.search.$post(...) used with tanstack/[email protected] useInfiniteQuery to produce InfiniteData<unknown, unknown>.

This regression appears related to the changes introduced in #4405. Pinning to hono 4.9.7 restores the previous typing behavior.

  • react ^19.1.0

What is the expected behavior?

hc<ApiRoutes> should create a typed client where each endpoint method exposes the correct response generic corresponding to the server route, permitting downstream code to infer the actual response shape.

What do you see instead?

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions