diff --git a/src/helper/dev/index.ts b/src/helper/dev/index.ts index 1dbd5b7dd..2dd66eaac 100644 --- a/src/helper/dev/index.ts +++ b/src/helper/dev/index.ts @@ -1,5 +1,5 @@ import type { Hono } from '../../hono' -import type { RouterRoute } from '../../types' +import type { Env, RouterRoute } from '../../types' interface ShowRoutesOptions { verbose?: boolean @@ -17,7 +17,7 @@ const handlerName = (handler: Function) => { return handler.name || (isMiddleware(handler) ? '[middleware]' : '[handler]') } -export const inspectRoutes = (hono: Hono): RouteData[] => { +export const inspectRoutes = (hono: Hono): RouteData[] => { return hono.routes.map(({ path, method, handler }: RouterRoute) => ({ path, method, @@ -26,7 +26,7 @@ export const inspectRoutes = (hono: Hono): RouteData[] => { })) } -export const showRoutes = (hono: Hono, opts?: ShowRoutesOptions) => { +export const showRoutes = (hono: Hono, opts?: ShowRoutesOptions) => { const routeData: Record = {} let maxMethodLength = 0 let maxPathLength = 0