Merge branch 'appcontroller-type' into 'main'

Fix type of AppController

See merge request soapbox-pub/ditto!171
This commit is contained in:
Alex Gleason 2024-04-20 23:53:03 +00:00
commit 270dbab456
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,7 @@ import {
type Handler,
Hono,
type HonoEnv,
Input,
logger,
type MiddlewareHandler,
sentryMiddleware,
@ -102,7 +103,7 @@ interface AppEnv extends HonoEnv {
type AppContext = Context<AppEnv>;
type AppMiddleware = MiddlewareHandler<AppEnv>;
type AppController = Handler<AppEnv>;
type AppController = Handler<AppEnv, any, Input, Response | Promise<Response>>;
const app = new Hono<AppEnv>();

View File

@ -5,6 +5,7 @@ export {
type Handler,
Hono,
HTTPException,
type Input,
type MiddlewareHandler,
} from 'https://deno.land/x/hono@v3.10.1/mod.ts';
export { cors, logger, serveStatic } from 'https://deno.land/x/hono@v3.10.1/middleware.ts';