Make AppController accept a path parameter

This commit is contained in:
Alex Gleason 2025-01-30 21:03:42 -06:00
parent c83a2dba7e
commit c3403ba724
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -166,7 +166,7 @@ export interface AppEnv extends HonoEnv {
type AppContext = Context<AppEnv>; type AppContext = Context<AppEnv>;
type AppMiddleware = MiddlewareHandler<AppEnv>; type AppMiddleware = MiddlewareHandler<AppEnv>;
type AppController = Handler<AppEnv, any, HonoInput, Response | Promise<Response>>; type AppController<P extends string = any> = Handler<AppEnv, P, HonoInput, Response | Promise<Response>>;
const app = new Hono<AppEnv>({ strict: false }); const app = new Hono<AppEnv>({ strict: false });