Search
Get Started
H
Hono
•
17mo ago
FBI_kingmohbil
how can I specify the return type of the response of API response
For example I want to do something like this
type a = (c:any) => JSON<{message: string}> c.get('/', (): a => {})
type a = (c:any) => JSON<{message: string}> c.get('/', (): a => {})
Hono
Join
This is the official Hono discord server for the community
4,382
Members
View on Discord
Similar Threads
Was this page helpful?
Yes
No
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
type
a
=
(
c
:
any
)
=>
JSON
<{
message
:
string
}>
c
.
get
(
'/'
, ()
:
a
=>
{})
type
a
=
(
c
:
any
)
=>
JSON
<{
message
:
string
}>
c
.
get
(
'/'
, ()
:
a
=>
{})
Similar Threads
Inferring the response type of a handler
H
Hono / help
6mo ago
I want to return component to API response which contsin useState.
H
Hono / help
14mo ago
[solved] return type of request handler
H
Hono / help
2y ago
How can I format response in Hono
H
Hono / help
2y ago