This repository was archived by the owner on Dec 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathTemplateFactory.d.ts
68 lines (68 loc) · 1.61 KB
/
TemplateFactory.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/**
* A helper class to provide a convenient and consistent way to render templates.
*
* @class TemplateFactory
* @module StructureJS
* @submodule util
* @requires StringUtil
* @requires Handlebars
* @author Robert S. (www.codeBelt.com)
* @static
*/
declare class TemplateFactory {
/**
* A constant value for using Underscore or Lodash templates.
*
* @property UNDERSCORE
* @type {string}
* @public
* @final
* @static
*/
static UNDERSCORE: string;
/**
* A constant value for using Handlebars templates. This is the default template engine.
*
* @property HANDLEBARS
* @type {string}
* @public
* @final
* @static
*/
static HANDLEBARS: string;
/**
* Sets the template engine type for this TemplateFactory class. The default is TemplateFactory.HANDLEBARS
*
* @property templateEngine
* @type {string}
* @default TemplateFactory.HANDLEBARS
* @public
* @static
*/
static templateEngine: string;
/**
* The global namespace for pre-compiled templates.
*
* @property templateNamespace
* @type {string}
* @default 'JST'
* @public
* @static
*/
static templateNamespace: string;
constructor();
/**
* Creates a template.
*
* @method create
* @param templatePath {any}
* @param [data=any]
* @returns {string}
* @public
* @static
* @example
* TemplateFactory.create('templateName', {some: 'data'});
*/
static create(templatePath: any, data?: any): string;
}
export default TemplateFactory;