import { Helpers, HelperFunction, Options, DataOrHelper } from './interfaces'; import { Store } from './store'; export declare class Tao { private config; private templatePaths; /** * Stores already compiled templates. */ compiledStore: Store; /** * Stores dynamically loaded templates. */ dynamictemplatesStore: Store; /** * Stores global helpers. */ helpersStore: Store; /** * Metrics - DX */ private parentTemplate; /** * Metrics - DX */ private childrenStore; constructor(customConfig?: Options); private initializeConfig; /** * Get an array of absolute paths of the mapped files according to the view directory provided. */ get mappedFiles(): string[]; private getMetrics; private compileChild; private compile; /** * A basic lexer covering most of the edge cases (quotes, comments, template literals, nested templates, etc.) to parse the template into an array of TemplateData containing the line information, start and end positions. */ private templateLexer; /** * Render a template with data and helpers. * @param template The path of your template to render. * @param dataOrHelpers The variables and helpers to inject. */ render(template: string, dataOrHelpers?: T): string; /** * Render a child component. Called inside the parent template. */ private renderChild; private compileAndExecuteChild; private compileAndExecute; private manageError; private executeChildFunction; private handleChildError; private executeFunction; /** * Needed inside error template : lineNumber, fileContent, message, filename */ private buildErrorTemplate; private compileChildAndCache; private compileAndCache; private readChildFileAndGetCompiledFn; private readFileAndGetCompiledFn; /** * Sync version is preferable, since HTML file are normally small (<100 Ko) * and should be cached. */ private readFile; /** * Handle dynamically defined templates */ private handleLoadedTemplate; private handleLoadedChildTemplate; /** * Handle dynamically defined templates */ private compileLoadedTemplate; private compileLoadedChildTemplate; /** * Define global helpers. Define once, use everywhere. * @param helpers An object of helpers. */ defineHelpers(helpers?: Helpers): void; /** * Load dynamically defined templates. * @param name The name of your template. Should start with a '@'. * @param template The template content. */ loadTemplate(name: string, template: string): void; } //# sourceMappingURL=tao.d.ts.map