/** * Twig Engine * PHP/Symfony compatible template engine * * Twig is nearly identical to Jinja2 with a few syntax differences: * - Ternary: cond ? x : y (instead of x if cond else y) * - Null coalesce: x ?? y * - Some filter name differences (e -> escape, raw -> safe) */ import type { TemplateNode } from '../../parser/nodes'; export { TwigLexer } from './lexer'; export { TwigParser, TWIG_FILTER_MAP } from './parser'; /** * Parse a Twig template string into an AST */ export declare function parse(source: string): TemplateNode; /** * Compile a Twig template to a render function */ export declare function compile(source: string): (context: Record) => Promise; /** * Render a Twig template with the given context */ export declare function render(source: string, context?: Record): Promise; /** * Engine descriptor for MultiEngine */ export declare const engine: { name: string; extensions: string[]; parse: typeof parse; compile: typeof compile; render: typeof render; }; //# sourceMappingURL=index.d.ts.map