HonoAppToHyperFetch
Converts the type of a Hono app into a Hyper Fetch SDK schema for
createSdk
.
Every route becomes a
Request
whose response, JSON payload, query params and endpoint come
from the Hono route definition and its validators. Path segments become nested properties,
:param
segments become
$param
properties, and kebab-case segments become camelCase.
Pass the type of the app returned by your route chain, including apps mounted with
app.route()
and
basePath()
. Anything that is not a Hono app resolves to
{}
.
Import
import { HonoAppToHyperFetch } from "@hyper-fetch/hono"
Source
Package
Preview
type HonoAppToHyperFetch<App,Client> = App extends HonoBase<any, infer S, any, any> ? Prettify<NestFlatRecord<ConvertToRequest<MergeUnionToRecord<S>, Client>>> : {};

