export = TemplateManager; /** * Template Manager factory */ declare class TemplateManager { /** * Gets a TemplateManager from scafflater options * * @param {ScafflaterOptions} options The Scafflater Options * @returns {TemplateManager} A template manager constructed based on options */ static fromOptions(options: ScafflaterOptions): TemplateManager; /** * * @param {TemplateCache} cache - The template cache storage * @param {TemplateSource} source - The template source * @param {ScafflaterOptions} options The Scafflater options */ constructor(cache: TemplateCache, source: typeof import("../template-source/template-source"), options: ScafflaterOptions); /** @constant {TemplateCache} */ templateCache: TemplateCache; /** @constant {TemplateSource} */ templateSource: typeof import("../template-source/template-source"); options: ScafflaterOptions; /** * Gets the template from source and stores in the cache * * @param {string} sourceKey - Teh source key * @returns {Promise} An object containing template config */ getTemplateFromSource(sourceKey: string): Promise; /** * Gets the template path, if it is stored in the cache. * * @param {string} templateName Template name * @param {string} templateVersion Template Version. If null, the latest stored version is returned. * @param {Source} source The template source. If the template is not cached, use this to try getting the template from source. * @returns {Promise} The cached template path. Returns null if the template is not in cache. */ getTemplate(templateName: string, templateVersion?: string, source?: typeof Source): Promise; /** * Gets the partial path, if it is stored in the cache. * * @param {string} partialName - Partial name * @param {string} templateName - Template name * @param {string} templateVersion - Template Version. If null, the latest stored version is returned. * @returns {Promise} Object containing the config and the path to partial. */ getPartial(partialName: string, templateName: string, templateVersion?: string): Promise; /** * List available partials in template. * * @param {string} templateName - Template name * @param {string} templateVersion - Template Version. If null, the latest stored version is returned. * @returns {Promise} Array of objects containing the config and the path to partial. */ listPartials(templateName: string, templateVersion?: string): Promise; } import { TemplateCache } from "../template-cache"; import { ScafflaterOptions } from "../options"; import { LocalTemplate } from "../scafflater-config/local-template"; import Source = require("../scafflater-config/source"); import { LocalPartial } from "../scafflater-config/local-template";