App

类型

1import type { Gez } from './gez';
2import { type Middleware } from './middleware';
3import { RenderContext, type RenderContextOptions } from './render-context';
4export interface App {
5    /**
6     * 中间件列表
7     */
8    middleware: Middleware;
9    /**
10     * 渲染函数
11     * @param options 透传给 RenderContextOptions
12     * @returns
13     */
14    render: (options?: RenderContextOptions) => Promise<RenderContext>;
15    /**
16     * 执行构建
17     */
18    build?: () => Promise<boolean>;
19    /**
20     * 销毁实例,释放内存
21     */
22    destroy?: () => Promise<boolean>;
23}
24export declare function createApp(gez: Gez): Promise<App>;
ON THIS PAGE