UNPKG

astroboy

Version:

Astroboy(阿童木)is a Nodejs SFB(Separation of Front and Back ends) framework, built on koa2.

28 lines (27 loc) 773 B
import { IViewManager } from '../../contract'; export declare class ViewManager extends Map implements IViewManager { private config; private extMap; private fileMap; /** * @param {Application} app - application instance */ constructor(app: any); /** * This method can register view engine. * * You can define a view engine class contains two method, `render` and `renderString` * * ```js * class View { * render() {} * renderString() {} * } * ``` * @param {String} name - the name of view engine * @param {Object} viewEngine - the class of view engine */ use(name: string, viewEngine: any): void; resolve(name: string): Promise<any>; private resolvePath; }