deno.land / x / abc@v1.3.3 / types.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 };
abc

Version Info

Tagged at
2 years ago