@kosatyi/ejs 0.0.75 → 0.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/global.d.ts +17 -28
package/package.json
CHANGED
package/types/global.d.ts
CHANGED
|
@@ -1,103 +1,92 @@
|
|
|
1
1
|
declare global {
|
|
2
|
-
|
|
2
|
+
interface EJS {
|
|
3
3
|
/**
|
|
4
4
|
* extend layout with blocks in current template file
|
|
5
5
|
* @param layout
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
extend(layout: string): any
|
|
9
8
|
/**
|
|
10
9
|
* define block with custom **name** and callback
|
|
11
10
|
* @param name
|
|
12
11
|
* @param [callback]
|
|
13
12
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
block(name: string, callback?: Function): any
|
|
16
14
|
/**
|
|
17
15
|
* set property in current scope
|
|
18
16
|
* @param path
|
|
19
17
|
* @param value
|
|
20
18
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
set(path: string, value: any): any
|
|
23
20
|
/**
|
|
24
21
|
* get property in current scope
|
|
25
22
|
* @param path
|
|
26
23
|
* @param defaults
|
|
27
24
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
get(path: string, defaults?: any): any
|
|
30
26
|
/**
|
|
31
27
|
* import macro from file **path** and set to current scope **name** property
|
|
32
28
|
* @param path
|
|
33
29
|
* @param name
|
|
34
30
|
*/
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
use(path: string, name: string): any
|
|
37
32
|
/**
|
|
38
33
|
* define macro function with custom **name**
|
|
39
34
|
* @param name
|
|
40
35
|
* @param callback
|
|
41
36
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
macro(name: string, callback: any): any
|
|
44
38
|
/**
|
|
45
39
|
* call macro function
|
|
46
40
|
* @param name
|
|
47
41
|
* @param props
|
|
48
42
|
* @param callback
|
|
49
43
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
call(name: string, props?: object, callback?: any): any
|
|
52
45
|
/**
|
|
53
46
|
* asynchronous template execution
|
|
54
47
|
* @param promise
|
|
55
48
|
* @param callback
|
|
56
49
|
*/
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
async(promise: Promise<any>, callback?: any): any
|
|
59
51
|
/**
|
|
60
52
|
* asynchronous template execution
|
|
61
53
|
* @param callback
|
|
62
54
|
*/
|
|
63
|
-
|
|
64
|
-
|
|
55
|
+
fn(callback: Function): any
|
|
65
56
|
/**
|
|
66
57
|
*
|
|
67
58
|
* @param {string} tag
|
|
68
59
|
* @param {object} attrs
|
|
69
60
|
* @param {function} content
|
|
70
61
|
*/
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
el(tag: string, attrs?: object, content?: any): any
|
|
73
63
|
/**
|
|
74
64
|
* buffer output
|
|
75
65
|
* @param args
|
|
76
66
|
*/
|
|
77
|
-
|
|
78
|
-
|
|
67
|
+
echo(...args: any[]): any
|
|
79
68
|
/**
|
|
80
69
|
* append rendered template from file
|
|
81
70
|
* @param path
|
|
82
71
|
* @param data
|
|
83
72
|
* @param cx
|
|
84
73
|
*/
|
|
85
|
-
|
|
86
|
-
|
|
74
|
+
include(path: string, data?: object, cx?: boolean): any
|
|
87
75
|
/**
|
|
88
76
|
*
|
|
89
77
|
* @param value
|
|
90
78
|
* @param callback
|
|
91
79
|
*/
|
|
92
|
-
|
|
93
|
-
|
|
80
|
+
each(value: any, callback: Function): any
|
|
94
81
|
/**
|
|
95
82
|
* define block with custom **name** and callback
|
|
96
83
|
* @param {string} name
|
|
97
84
|
* @param {object} [props]
|
|
98
85
|
*/
|
|
99
|
-
|
|
86
|
+
ui(name: string, props?: object): any
|
|
100
87
|
}
|
|
88
|
+
|
|
89
|
+
const ejs: EJS
|
|
101
90
|
}
|
|
102
91
|
|
|
103
92
|
export = global
|