Skip to main content
Module

x/keywork/mod.ts>Router.MiddlewareFetch

A library for building V8 Isolate web apps on Cloudflare Workers, Deno, and Node.JS
Go to Latest
interface Router.MiddlewareFetch
Re-export
import { type Router } from "https://deno.land/x/keywork@v6.0.1/mod.ts";
const { MiddlewareFetch } = Router;

Middleware implementation of fetch

This type is similar to typeof fetch with the option to return null to fallthrough.

Type Parameters

optional
BoundAliases = { }
optional
ExpectedReturn extends MiddlewareReturnTypes = Promise<Response>

Call Signatures

(
request: globalThis.Request,
eventLike?: unknown,
next?: (...args: Partial<Parameters<MiddlewareFetch<BoundAliases, MiddlewareReturnTypes>>>) => MiddlewareReturnTypes,
matchedRoutes?: RouteMatch<any>[],
): ExpectedReturn