Merge branch 'appcontroller-type' into 'main'
Fix type of AppController See merge request soapbox-pub/ditto!171
This commit is contained in:
commit
270dbab456
|
@ -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>();
|
||||||
|
|
||||||
|
|
|
@ -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';
|
||||||
|
|
Loading…
Reference in New Issue