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

View File

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