swc/bundler/tests/.cache/deno/2adbfab19da02fbe2ff485f9c907b5b023afc151.ts
강동윤 bbaf619f63
fix(bundler): Fix bugs (#1437)
swc_bundler:
 - [x] Fix wrapped esms. (denoland/deno#9307)
 - [x] Make test secure.
2021-03-02 17:33:03 +09:00

21 lines
743 B
TypeScript

// Loaded from https://deno.land/x/abc@v1.2.4/types.ts
import type { ServerRequest } from "./vendor/https/deno.land/std/http/server.ts";
import type { Context } from "./context.ts";
import type { Application } from "./app.ts";
/** `Renderer` is the interface that wraps the `render` function. */
export type Renderer = {
templates?: string;
render<T>(name: string, data: T): Promise<Deno.Reader>;
};
/* `HandlerFunc` defines a function to serve HTTP requests. */
export type HandlerFunc = (c: Context) => Promise<unknown> | unknown;
/* `MiddlewareFunc` defines a function to process middleware. */
export type MiddlewareFunc = (next: HandlerFunc) => HandlerFunc;
export type ContextOptions = { app: Application; r: ServerRequest };