UNPKG

@midwayjs/view

Version:

Midway Component for render view

18 lines 678 B
import { ViewManager } from './viewManager'; import { IViewEngine, RenderOptions } from './interface'; /** * View instance for each request. * * It will find the view engine, and render it. * The view engine should be registered in {@link ViewManager}. */ export declare class ContextView implements IViewEngine { viewManager: ViewManager; viewConfig: any; ctx: any; render(name: string, locals?: Record<string, any>, options?: RenderOptions): Promise<string>; renderString(tpl: string, locals?: Record<string, any>, options?: RenderOptions): Promise<string>; private getViewEngine; private setLocals; } //# sourceMappingURL=contextView.d.ts.map