Skip to main content
Module

x/keywork/mod.ts>RouterUtils.MiddlewareFetch

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

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?: Request,
eventLike?: unknown,
next?: (...args: Partial<Parameters<MiddlewareFetch<BoundAliases, MiddlewareReturnTypes>>>) => MiddlewareReturnTypes,
matchedRoutes?: RouteMatch<any>[],
): ExpectedReturn