Update the typings to the official version 1.10.4

This commit is contained in:
Tim Schumacher
2017-05-17 14:20:23 +02:00
parent 2a89f40ab7
commit 2175c7d3f9
2 changed files with 24 additions and 13 deletions

24
types/twig/index.d.ts vendored
View File

@@ -1,6 +1,7 @@
// Type definitions for twig
// Project: https://github.com/justjohn/twig.js
// Project: https://github.com/twigjs/twig.js
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>
// Tim Schumacher <https://github.com/enko>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Imported from: https://github.com/soywiz/typescript-node-definitions/twig.d.ts
@@ -8,16 +9,25 @@
export interface Parameters {
id?: any;
ref?: any;
href?: any;
blocks?: any;
macros?: any;
base?: any;
path?: any;
debug?: boolean;
trace?: boolean;
strict_variables?: boolean;
data: any;
url?: any;
name?: any;
method?: any;
options?: any;
}
export interface Template {
reset(blocks: any): void;
render(context?: any, params?: any, allow_async?: boolean): string | Promise<string>;
renderAsync(context?: any, params?: any): Promise<string>;
importFile(file: string): Template;
importBlocks(file: string, override?: boolean): void;
importMacros(file: string): Template;
getLoaderMethod(): string;
compile(options: any) : string;
}
export interface CompileOptions {

View File

@@ -8,13 +8,14 @@ var bool: boolean;
var params: twig.Parameters = {
id: value,
ref: value,
href: value,
path: value,
debug: bool,
trace: bool,
strict_variables: bool,
data: value
base: value,
blocks: value,
macros: value,
method: value,
name: value,
options: value,
url: value
};
var temp: twig.Template;