UNPKG

squirrelly

Version:

Lightweight, fast, and powerful JS template engine. Supports helpers, filters, template inheritance

21 lines (20 loc) 775 B
import { SqrlConfig } from './config'; import { TemplateFunction } from './compile'; export declare type CallbackFn = (err: Error | null, str?: string) => void; interface DataObj { [key: string]: any; } /** * Get the template function. * * If `options.cache` is `true`, then the template is cached. * * @param {String} path path for the specified file * @param {Options} options compilation options * @return {(TemplateFunction|ClientFunction)} * Depending on the value of `options.client`, either type might be returned * @static */ declare function includeFile(path: string, options: SqrlConfig): TemplateFunction; declare function renderFile(filename: string, data: DataObj, cb?: CallbackFn): any; export { includeFile, renderFile };