import { Tree } from './parse'; import { Node } from './node'; export type FuncMap = Map; interface option { missingKey: string; } declare class common { tmpl: Map; option: option; parseFuncs: FuncMap; execFuncs: Map; } export declare class Template { name: string; Tree: Tree | null; common: common | null; leftDelim: string; rightDelim: string; rootName: string; constructor(name: string); Name(): string; New(name: string): this; init(): void; Clone(): [Template, Error | null]; copy(c: common | null): Template; AddParseTree(name: string, tree: Tree): [Template, Error | null]; Templates(): Template[]; Delims(left: string, right: string): this; Funcs(funcMap: FuncMap): this; private goodName; private isLetter; private isDigit; Lookup(name: string): Template | null; Parse(text: string): [Template, Error | null]; associate(newTemplate: Template, tree: Tree): boolean; Execute(data: any): Promise<[string, Error | null]>; ExecuteTemplate(name: string, data: any): Promise<[string, Error | null]>; private execute; ErrorContext(node: Node): [string, string]; Option(...opt: string[]): this; private setOption; } export declare function New(name: string): Template; export declare function builtins(): FuncMap; export declare class ExecError extends Error { name: string; err: Error; constructor(name: string, err: Error); Error(): string; } export declare function JSEscapeString(s: string): string; export {};