Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Context

import type { Context } from "https://raw.githubusercontent.com/worker-tools/middleware/master/index.ts";
interface Context {
args?: any[];
connInfo?: any;
ctx?: any;
env?: any;
event?: FetchEvent;
handled: Promise<Response>;
request: Request;
waitUntil: (f: any) => void;
}

§Properties

§
args?: any[]
[src]

Might be present based on usage

§
connInfo?: any
[src]

Might be present based on usage

§
ctx?: any
[src]

Might be present based on usage

§

A list of effects/transforms applied to the Response after the application handler completes. Middleware can add effects to the list. Application handlers should ignore it.

§
env?: any
[src]

Might be present based on usage

§

Only available if the router is used via fetchEventListener. Many Worker Runtimes such as Deno an CF module workers don't provide fetch events.

§
handled: Promise<Response>
[src]

A promise that resolves when middleware is done applying effects. Related: https://github.com/w3c/ServiceWorker/issues/1397

§

The URL pattern match that caused this handler to run. See the URL Pattern API for more.

§
request: Request
[src]

The original request for use in middleware. Also accessible via first argument to user handler.

§
waitUntil: (f: any) => void
[src]

TODO