import { InputValues } from "../schema/index.js"; /** * Type that specifies the format of a template. It can be either * "f-string" or "jinja2". */ export type TemplateFormat = "f-string" | "jinja2"; /** * Type that represents a node in a parsed format string. It can be either * a literal text or a variable name. */ type ParsedFStringNode = { type: "literal"; text: string; } | { type: "variable"; name: string; }; export declare const parseFString: (template: string) => ParsedFStringNode[]; export declare const interpolateFString: (template: string, values: InputValues) => string; /** * Type that represents a function that takes a template string and a set * of input values, and returns a string where all variables in the * template have been replaced with their corresponding values. */ type Interpolator = (template: string, values: InputValues) => string; /** * Type that represents a function that takes a template string and * returns an array of `ParsedFStringNode`. */ type Parser = (template: string) => ParsedFStringNode[]; export declare const DEFAULT_FORMATTER_MAPPING: Record; export declare const DEFAULT_PARSER_MAPPING: Record; export declare const renderTemplate: (template: string, templateFormat: TemplateFormat, inputValues: InputValues) => string; export declare const parseTemplate: (template: string, templateFormat: TemplateFormat) => ParsedFStringNode[]; export declare const checkValidTemplate: (template: string, templateFormat: TemplateFormat, inputVariables: string[]) => void; export {};