Master the vocabulary behind Hono's end-to-end type-safe RPC client.
0 / 5 completed
1 / 5
At standup, a dev wants end-to-end type safety between a Hono backend and its client without codegen. Which feature fits?
Hono RPC, via the hc client, infers request and response types directly from the Hono app's route definitions, giving type-safe calls without a separate code generation step. Types flow automatically from server route to client call. This is a core selling point of building both ends with Hono.
2 / 5
During a design review, the team wants strong typing on route params and query strings. Which Hono feature enables this in RPC?
Attaching a validator (such as zValidator) to a route both validates incoming data and refines the route's inferred types, which then flow into the RPC client's types. Without a validator, params may default to loose types. This is how Hono achieves precise end-to-end inference.
3 / 5
In a code review, a dev exports the app's type to share with the client package. What is typically exported?
Developers commonly export an AppType (via typeof app) from the server package so the RPC client can import it and derive fully typed request/response shapes. This type-only import carries no runtime cost. It is the mechanism that wires client type inference to the actual routes.
4 / 5
An incident report shows the client's inferred types didn't match after adding a new route. What likely happened?
Because RPC types are derived from the AppType, stale inferred types on the client usually mean the type export wasn't rebuilt or the client didn't pick up the updated type definitions. Rerunning the build or type-check step resolves the mismatch. This is a common gotcha in monorepos with independent build steps.
5 / 5
During a PR review, a teammate calls a POST route through the RPC client. What ensures the request body type matches the server schema?
The hc client's call signatures are generated from the route's type inference chain, including any validator, so the body argument is compile-time checked against the expected shape. This catches mismatches before running the code. It is the practical payoff of Hono's RPC type flow.