import { default } from "https://deno.land/x/nunjucks@3.2.4/mod.d.ts";
const { Environment } = default;
Constructors
new
Environment(loader?: ILoader | ILoader[] | null, opts?: ConfigureOptions)Methods
addExtension(name: string, ext: Extension): Environment
addFilter(): Environment
name: string,
func: (...args: any[]) => any,
async?: boolean,
addGlobal(name: string, value: any): Environment
express(app: Record<string, unknown>): void
getExtension(name: string): Extension
getFilter(name: string): (...args: any[]) => any
getGlobal(name: string): any
getTemplate(name: string, eagerCompile?: boolean): Template
getTemplate(): void
hasExtension(name: string): boolean
removeExtension(name: string): void
render(name: string, context?: Record<string, unknown>): string
render(): void
renderString(name: string, context: Record<string, unknown>): string
renderString(): void