github honojs/hono v3.0.3

latest releases: v4.6.2, v4.6.1, v4.6.0...
18 months ago

Summary

This is a patch release but includes small new features.

Improve app.route()

We can specify "base path" with app.route:

const api = new Hono().route('/api')
const route = api.get('/search', (c) => c.jsonT({ ok: true }))

type AppType = typeof route

const client = hc<AppType>('/')
client.api.search.$get()

Improve handling types

jsonT() does not allow non-JSON object such as Date:

SS

If $get() needs arguments but it's blank, it throw the type error.

SS

What's Changed

New Contributors

Full Changelog: v3.0.2...v3.0.3

Don't miss a new hono release

NewReleases is sending notifications on new releases.