doT.js API allows modification of the exported templateSettings property. Change from const (#16385)

This commit is contained in:
Stephen Ierodiaconou
2017-06-01 08:43:32 -07:00
committed by Andy
parent c9c78dff64
commit 8a7e78869e
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -23,6 +23,8 @@ const data = {
name: "My name"
};
doT.templateSettings.varname = 'test';
let pagefn = doT.template(pagetmpl, undefined, def);
const content = pagefn(data);
+2 -2
View File
@@ -8,8 +8,8 @@ export as namespace doT;
/** Version number */
export const version: string;
/** Default template settings */
export const templateSettings: TemplateSettings;
/** Template settings */
export let templateSettings: TemplateSettings;
export type RenderFunction = (...args: any[]) => string;