UNPKG

@ackplus/nest-dynamic-templates

Version:

A powerful and flexible dynamic template rendering library for NestJS applications with support for Nunjucks, Handlebars, EJS, Pug, MJML, Markdown, and more.

17 lines (16 loc) 732 B
import { TemplateEngineEnum } from '../../interfaces/template.types'; import { TemplateEngine } from '../template-engine'; import type { ConfigureOptions } from 'nunjucks'; import { CustomEngineOptions } from '../../interfaces/module-config.interface'; export declare class NunjucksEngine extends TemplateEngine { private readonly options; private readonly customOptions; static engineName: TemplateEngineEnum; static displayName: string; static peerPackage: string; private env?; constructor(options?: ConfigureOptions, customOptions?: CustomEngineOptions); private getEnv; render(content: string, data?: Record<string, any>): Promise<string>; validate(content: string): Promise<boolean>; }