forked from knapsack-cloud/twig-renderer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
48 lines (45 loc) · 1017 Bytes
/
index.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
export interface TwigRendererConfig {
src: {
/** Root directories for Twig Loader */
roots: string[];
namespaces?: {
id: string;
recursive?: boolean;
paths: string[];
}[]
};
relativeFrom?: string;
alterTwigEnv?: {
file: string;
functions: string[];
}[];
hasExtraInfoInResponses?: boolean;
autoescape?: boolean;
debug?: boolean;
verbose?: boolean;
keepAlive?: boolean;
maxConcurrency?: number;
}
declare class TwigRenderer {
inProgressRequests: number;
totalRequests: number;
completedRequests: number;
config: TwigRendererConfig;
constructor(userConfig: TwigRendererConfig);
render: (template: string, data?: object) => Promise<{
ok: boolean,
html: string,
message: string,
}>;
renderString: (template: string, data?: object) => Promise<{
ok: boolean,
html: string,
message: string,
}>;
getMeta: () => Promise<object>;
}
// declare namespace TwigRenderer {
// export
//
// }
export default TwigRenderer;