Skip to content

Commit c8e8623

Browse files
committed
- Added twig.d.ts
1 parent fa4ad4d commit c8e8623

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

twig.d.ts

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
declare module "twig" {
2+
export interface Parameters {
3+
id?: any;
4+
ref?: any;
5+
href?: any;
6+
path?: any;
7+
debug?: bool;
8+
trace?: bool;
9+
strict_variables?: bool;
10+
data: any;
11+
}
12+
13+
interface Template {
14+
}
15+
16+
interface CompileOptions {
17+
filename: string;
18+
settings: any;
19+
}
20+
21+
export function twig(params: Parameters): Template;
22+
export function extendFilter(name: string, definition: (left: any, ...params: any[]) => string): void;
23+
export function extendFunction(name: string, definition: (...params: any[]) => string): void;
24+
export function extendTest(name: string, definition: (value: any) => bool): void;
25+
export function extendTag(definition: any): void;
26+
export function compile(markup: string, options: CompileOptions): (context) => any;
27+
export function renderFile(path, options: CompileOptions, fn: (err, result) => void): void;
28+
export function __express(path, options: CompileOptions, fn: (err, result) => void): void;
29+
export function cache(value: bool): void;
30+
}

0 commit comments

Comments
 (0)