diff --git a/src/plugins/fs_routes/mod.ts b/src/plugins/fs_routes/mod.ts index 2dcf8348b27..e3c4b376025 100644 --- a/src/plugins/fs_routes/mod.ts +++ b/src/plugins/fs_routes/mod.ts @@ -4,7 +4,7 @@ import type { WalkEntry } from "@std/fs/walk"; import * as path from "@std/path"; import type { RouteConfig } from "../../types.ts"; import type { RouteHandler } from "../../handlers.ts"; -import type { MiddlewareFn } from "../../middlewares/mod.ts"; +import type { Middleware, MiddlewareFn } from "../../middlewares/mod.ts"; import { type AsyncAnyComponent, renderMiddleware, @@ -35,8 +35,7 @@ export interface FreshFsItem { default?: | AnyComponent> | AsyncAnyComponent> - | ((ctx: FreshReqContext<{ text: string }>) => Promise) - | ((ctx: FreshReqContext<{ text: string }>) => Promise)[]; + | Middleware; } // deno-lint-ignore no-explicit-any