Answer Overflow Logo
Change Theme
Search Answer Overflow
GitHub
Add Your Server
Login
Home
Popular
Topics
Gaming
Programming
meow
Explore posts from servers
R
Reactiflux
CD
Cloudflare Developers
D
Deno
S
SolidJS
T
tRPC
TTC
Theo's Typesafe Cult
H
Hono
DT
Drizzle Team
Posts
Comments
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
They specifically ban blank objects, I see
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
Ah hmm
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
And when I inspect the response on the other end it returns an object on the other end since that's valid JSON
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
But the above route truly does return
never
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
Your advice works and I'm gonna be doing that
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
I simplified it to just this
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
.
get
(
"/"
,
async
(
c
)
=>
{
return
c.
json
({})
})
.
get
(
"/"
,
async
(
c
)
=>
{
return
c.
json
({})
})
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
Try it directly. Create an empty route that just does
return c.json({})
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
It should just be an empty object!
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
But IMO...
c.json({})
shouldn't be
never
!!!
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
Thanks so much
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
Okay that works as a workaround
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
I see
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
Ohh
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
or
?? {}
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
Yup so I do
?? []
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
Sometimes you want to return empty array
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
But empty object is valid JSON...
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
???
69 replies
H
Hono
•
Created by meow on 1/25/2025 in
#help
No Types for RPC with abstracted routes
Did I do something retarded
69 replies