import { Eta } from "../../deps/jsr.io/@eta-dev/eta/3.5.0/src/index.js"; import type { IPluginOptions, IPluginSetup } from "./typeDeclaration.js"; /** * Sets up the template engine with the provided options. * * @param {IPluginOptions} options - The plugin options to use for setting up the template. * @param {object} [template] - The template options. * @return {Eta} The set up template instance. */ export declare const setupTemplate: (options: IPluginOptions, template?: { /** * 语言插件目录名称 * @default `options.lang` */ langDirectoryName?: string; /** * 模板文件路径 * @default `./src/plugins/{{langDirectoryName}}/template` */ path?: string; }) => Eta; /** * Renders a template based on the provided name and data. * * @param {string} name - The name of the template to render. * @param {Record} data - The data to be used in the template. * @return {string} The rendered template as a string. */ export declare const renderTemplate: (name: string, data: Record) => string; /** * Render a template with Eta. * * @param content - A string of template. * @param data - A object contains data. * @returns A rendered string. */ export declare const renderEtaString: (content: string, data: Record) => string; /** * Converts a given type to a string representation, taking into account the provided reference and plugin setup. * * @param {string|string[]} type - The type to be converted. * @param {string} [ref] - The reference type. * @param {pluginSetup | IPluginOptions} [pluginSetup] - The plugin setup. * @return {string} The converted type as a string. */ export declare const convertType: (type: string | string[], ref?: string, additionalRef?: string, pluginSetup?: IPluginSetup | IPluginOptions) => string; export declare const validTemplate: (template: IPluginOptions["template"]) => void; /** * 构建 ETA 模板映射表 * * 扫描指定目录下的所有 `.eta` 模板文件,将其内容读取并构建为文件名到内容的映射表, * 最终生成一个包含所有模板内容的 `index.ts` 自动导出文件。 * * @param dir - 包含 ETA 模板文件的目录路径 * @returns Promise */ export declare const buildEta: (dir: string) => Promise; //# sourceMappingURL=common.d.ts.map