From 2175c7d3f9b5812f554a780e0e45f4ed75c5f4ee Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Wed, 17 May 2017 14:20:23 +0200 Subject: [PATCH] Update the typings to the official version 1.10.4 --- types/twig/index.d.ts | 24 +++++++++++++++++------- types/twig/twig-tests.ts | 13 +++++++------ 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/types/twig/index.d.ts b/types/twig/index.d.ts index ddce91ea6b..d094e6364e 100644 --- a/types/twig/index.d.ts +++ b/types/twig/index.d.ts @@ -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 +// Tim Schumacher // 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; + renderAsync(context?: any, params?: any): Promise; + importFile(file: string): Template; + importBlocks(file: string, override?: boolean): void; + importMacros(file: string): Template; + getLoaderMethod(): string; + compile(options: any) : string; } export interface CompileOptions { diff --git a/types/twig/twig-tests.ts b/types/twig/twig-tests.ts index 6b517d0c73..292962a0a0 100644 --- a/types/twig/twig-tests.ts +++ b/types/twig/twig-tests.ts @@ -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;