forked from soywiz-archive/typescript-node-definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtwig.d.ts
30 lines (27 loc) · 1011 Bytes
/
twig.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
declare module "twig" {
export interface Parameters {
id?: any;
ref?: any;
href?: any;
path?: any;
debug?: bool;
trace?: bool;
strict_variables?: bool;
data: any;
}
interface Template {
}
interface CompileOptions {
filename: string;
settings: any;
}
export function twig(params: Parameters): Template;
export function extendFilter(name: string, definition: (left: any, ...params: any[]) => string): void;
export function extendFunction(name: string, definition: (...params: any[]) => string): void;
export function extendTest(name: string, definition: (value: any) => bool): void;
export function extendTag(definition: any): void;
export function compile(markup: string, options: CompileOptions): (context) => any;
export function renderFile(path, options: CompileOptions, fn: (err, result) => void): void;
export function __express(path, options: CompileOptions, fn: (err, result) => void): void;
export function cache(value: bool): void;
}