Type-safe REST client for Hono (without RPC notation) #4612
Andyyyy64
started this conversation in
Show and tell
Replies: 4 comments 1 reply
-
|
Very interesting. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
I've just updated the library to be much more production-ready! 🚀 Key improvements:
It feels much more solid now for real-world usage! |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Tweeted: https://x.com/yusukebe/status/2008713437199917479?s=20 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Hono community 👋
I’ve been experimenting with Hono’s type system and ended up building a small library called hono-typed-rest.
The goal is simple:
get tRPC-level type safety and editor completion, but keep plain REST-style calls like:
instead of RPC-style notation such as:
What it does
AppTypeas a type contract (no code generation)fetchwrapper — all the magic is at the type levelWhat it does NOT do
hcAppType(monorepo or shared contract package)Status
🚧 Work in progress
The API is still evolving and type-level performance can be heavy in large projects.
GitHub:
https://github.com/Andyyyy64/hono-typed-rest
I’d love to hear if others have tried something similar or have opinions on REST vs RPC-style clients in Hono!
Beta Was this translation helpful? Give feedback.
All reactions