// Type definitions for nunjucks 3.2 // Project: http://mozilla.github.io/nunjucks/, https://github.com/mozilla/nunjucks // Definitions by: Matthew Burstein // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 export type TemplateCallback = (err: lib.TemplateError | null, res: T | null) => void; export type Callback = (err: E | null, res: T | null) => void; export function render(name: string, context?: object): string; export function render(name: string, context?: object, callback?: TemplateCallback): void; export function renderString(src: string, context: object): string; export function renderString(src: string, context: object, callback?: TemplateCallback): void; export function compile(src: string, env?: Environment, callback?: TemplateCallback