35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
import nunjucks from "nunjucks";
|
|
import Immutable from "immutable";
|
|
import TemplateBlock from "./templateBlock";
|
|
import TemplateOutput from "./templateOutput";
|
|
type Extensions = Immutable.Map<any, any>;
|
|
declare const TemplateEngine_base: Immutable.Record.Class;
|
|
declare class TemplateEngine extends TemplateEngine_base {
|
|
getBlocks(): TemplateBlock;
|
|
getGlobals(): Immutable.Map<string, any>;
|
|
getFilters(): any;
|
|
getShortcuts(): any;
|
|
getLoader(): nunjucks.FileSystemLoader;
|
|
getContext(): object;
|
|
getExtensions(): Extensions;
|
|
/**
|
|
Return a block by its name (or undefined)
|
|
|
|
@param {string} name
|
|
@return {TemplateBlock}
|
|
*/
|
|
getBlock(name: string): TemplateBlock;
|
|
/**
|
|
Return a nunjucks environment from this configuration
|
|
*/
|
|
toNunjucks(blocksOutput?: TemplateOutput): nunjucks.Environment;
|
|
/**
|
|
Create a template engine
|
|
|
|
@param {Object} def
|
|
@return {TemplateEngine}
|
|
*/
|
|
static create(def: any): TemplateEngine;
|
|
}
|
|
export default TemplateEngine;
|
|
//# sourceMappingURL=templateEngine.d.ts.map
|