1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | export type JadeCustomFilterFunction = (text: string, options: {
|
7 | [key: string]: boolean;
|
8 | }) => string;
|
9 |
|
10 | export interface JadeOptions {
|
11 | filename?: string | undefined;
|
12 | basedir?: string | undefined;
|
13 | doctype?: string | undefined;
|
14 | pretty?: boolean | string | undefined;
|
15 | filters?: {
|
16 | [key: string]: JadeCustomFilterFunction
|
17 | } | undefined;
|
18 | self?: boolean | undefined;
|
19 | debug?: boolean | undefined;
|
20 | compileDebug?: boolean | undefined;
|
21 | globals?: string[] | undefined;
|
22 | cache?: boolean | undefined;
|
23 | inlineRuntimeFunctions?: boolean | undefined;
|
24 | name?: string | undefined;
|
25 | }
|
26 |
|
27 | export interface TemplateLocals {
|
28 | [key: string]: any;
|
29 | }
|
30 |
|
31 | export type JadeGenerationFunction = (locals?: TemplateLocals) => string;
|
32 |
|
33 | export declare function compile(template: string, options?: JadeOptions): JadeGenerationFunction;
|
34 | export declare function compileFile(path: string, options?: JadeOptions): JadeGenerationFunction;
|
35 | export declare function compileClient(template: string, options?: JadeOptions): JadeGenerationFunction;
|
36 | export declare function compileClientWithDependenciesTracked(template: string, options?: JadeOptions): {
|
37 | body: JadeGenerationFunction;
|
38 | dependencies: string[];
|
39 | };
|
40 | export declare function render(template: string, options?: JadeOptions): string;
|
41 | export declare function renderFile(path: string, options?: JadeOptions): string;
|