import { CompilerOptions } from './compiler'; /** * A dynamically compiled/evaluated template. */ export declare type Template = (data?: Record) => string; export { CompilerOptions as CompileOptions }; /** * Compiles the template returning the generated source code, this is an * advanced API in most cases you might want to use {@link compile}. * * @param source The template source code. * @param options Options passed to the compiler. * ## Default Options * ```ts * { * uri: null, * mode: 'iife', * sourceMap: false, * typescript: false, * partials: null * } * ``` */ export declare function compileSource(source: string, options?: Partial): string; /** * Dynamically compiles the template and returns a {@link Template} function, * you must prefer pre-compiling the template files, for faster bootstraps. * * # Example * ```ts * import { compile } from 'tblk'; * const template = compile('Hello <% name %>!'); * console.log(template({name: "World" })); * ``` * * @param template The source code for the template. * @param options Options passed to the compiler. * `mode` and `typescript` options are ignored and the default values of `iife` and * `false` are used accordingly. */ export declare function compile(template: string, options?: Partial): Template;